Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
Ranked #4K
~1K People Reached
Favorite Forums
Favorite Tags
c x 9
Member Avatar for rcbhat

I thought that the function parameters were pushed onto stack from right to left. [code=C] #include <stdio.h> main() { int i=0; printf("%d %d\n",scanf(" %d",&i),i); } [/code] But this code prints out the keyboard entered value instead of 0. Why is it so?

Member Avatar for wildgoose
0
125
Member Avatar for rcbhat

I have the following code, [code=C] main() { char *p="abc"; int x; x=++*p++; printf("%d",x); } [/code] My question is, when I try to do x=++*p++, the program crashes. If my associativity rules are right, first the address pointed to by p should be incremented by the postfix (p++) and then …

Member Avatar for Alibeg
0
510
Member Avatar for rcbhat

[code=C] #include<stdio.h> int array[]={1,2,3,4,5,6,7,8}; #define SIZE (sizeof(array)/sizeof(int)) int main() { printf("%d",SIZE); if(-1<=SIZE) printf("1"); else printf("2"); return 0; } [/code] how is SIZE casted in this example? Because the compiler believes -1 > SIZE (which is 8). Is this because it was treated as unsigned char and -1 looped around to …

Member Avatar for kvprajapati
0
95
Member Avatar for Dream2code

Hi All, My requirement is like this.It a part of a software devlopment team as i am devloping a tool its a part of it. Its bit long but my explanation is clear to get it. 1)we need to read a data file using a description file. Usage: programname <description_file> …

Member Avatar for Dave Sinkula
0
429
Member Avatar for rcbhat

Hi, this is the code that I have to swap two strings- [code=C] void swap(char *,char *); main() { char *x="new"; char *y="word"; char *t; swap(x,y); printf("(%s,%s)",x,y); } void swap(char *x,char *y) { char *t; t=x; x=y; y=x; } [/code] output- (new,word) Why is the swap function not swapping the …

Member Avatar for tuse
0
268