Replies
Welcome, guest
Join CrazyEngineers to reply, ask questions, and participate in conversations.
CrazyEngineers powered by Jatra Community Platform
-
@anandkumarjha-jzdDMA • Oct 4, 2010
what will be the output of the following codes any why????please explain....
#include<stdio.h>
#include<conio.h>
void main()
{
printf("%d",printf("%d %d",2,2)& printf("%d %d",2,2));
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
printf("%d",printf("%d %d",2,2)& printf("%d %d",2,2));
getch();
}
although thay look like same but they different from each other -
@sam-from-hell-8gE2gC • Oct 4, 2010
Its throwing up a error "Expected ')' before numeric constant"anandkumarjhamain()
{
char thought[2][30]={"Don't walk infront me..","i am not follow"};
printf("%c%c",*(thought[0]9),*(*(thought 0)5));
}
What will be the output of this code??? -
@silverscorpion-iJKtdQ • Oct 5, 2010
I dont see any difference between the first and the second.. I think both are one and the same..anandkumarjhawhat will be the output of the following codes any why????please explain....
#include<stdio.h>
#include<conio.h>
void main()
{
printf("%d",printf("%d %d",2,2)& printf("%d %d",2,2));
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
printf("%d",printf("%d %d",2,2)& printf("%d %d",2,2));
getch();
}
although thay look like same but they different from each other
Anyhow, for the first program, the output is,
2 2 2 2 1
There are 2 printf statements inside the main printf statement.. printf statement returns the number of characters it has sent to the output buffer..
So, both the inner printf's will return 2. It becomes '2 & 2' which is 1. So, 1 is printed last..