General Knowledge :: Testing New
-
Determine output:
void main()
{
int const *p=5;
printf("%d", ++(*p));
}
-
Determine Output:
void main()
{
char s[]="man";
int i;
for(i=0; s[i]; i++)
printf("%c%c%c%c ", s[i], *(s+i), *(i+s), i[s]);
}
-
Determine Output:
void main()
{
float me = 1.1;
double you = 1.1;
if(me==you)
printf("I hate Examveda");
else
printf("I love Examveda");
}
-
Determine Output:
void main()
{
static int var = 5;
printf("%d ", var--);
if(var)
main();
}
-
Determine Output:
void main()
{
char *p;
printf("%d %d", sizeof(*p), sizeof(p));
}
-
Determine the Final Output:
void main()
{
printf("\nab");
printf("\bsi");
printf("\rha");
}
-
Determine Output:
#define int char
void main()
{
int i = 65;
printf("sizeof(i)=%d", sizeof(i));
}
-
Determine Output:
void main()
{
int i=3;
switch(i)
{
default: printf("zero");
case 1: printf("one"); break;
case 2: printf("two"); break;
case 3: printf("three"); break;
}
}