Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+2
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
Ranked #4K
~969 People Reached
Favorite Forums
Favorite Tags
c x 6
c++ x 4
Member Avatar for shaker naser

[code=c] #include <stdio.h> void main() { int d,m,y; int days=0; int k; // return var printf("input date dd.mm.yyyy\n"); scanf("%d.%d.%d",&d,&m,&y); m--; switch(m) { case 11:days=30; case 10:days+=31; case 9:days+=30; case 8:days+=31; case 7:days+=31; case 6:days+=30; case 5:days+=31; case 4:days+=30; case 3:days+=31; case 2:if((!(y%4))&&(y%100)) days+=29; else if(!(y%400)) days+=29; else days+=28; case 1:days+=31; …

Member Avatar for thines01
0
318
Member Avatar for rithish

you need it for dynamic memory allocation. just think of a program where sb has to input a n-dimensional matrix of unkown n. let the user input n and then go forward to get the necessary memory space. next advantage of malloc is that all the memory-places allocated stick next …

Member Avatar for deceptikon
0
121
Member Avatar for irre

hi there im wondering about the difference between: int nr; if(!((nr--)%5)){...} if(!((nr--)%5)){...} and: int nr; if(!(--nr)%5)){...} if(!(--nr)%5)){...} is it right that in case 1 nr will be decremented after true/false comparison and in case 2 in advance? assuming nr=123456; in case 1 it would be true for second if.... and …

Member Avatar for WaltP
0
150
Member Avatar for KRUX17

i usually use do{...}while(1); 1 is always true, therefore it will stay in the loop. if you want to get out of it, the command "break;" should do it.

Member Avatar for irre
0
201
Member Avatar for irre

hello, im totally new to this forum, but i already checked whether my ask is answered somewhere else already. i couldnt find anything... i used to work with dev-cpp and i have to work with the cnum.h library a lot. Since im a student i am able to get MS …

Member Avatar for Ancient Dragon
0
179