General Knowledge :: Testing New
-
Determine Output:
#include<stdio.h>
void main()
{
register i=5;
char j[]= "hello";
printf("%s %d", j, i);
}
-
Determine Output:
void main()
{
int i=5, j=6, z;
printf("%d", i+++j);
}
-
Determine Output:
void main()
{
int i = abc(10);
printf("%d", --i);
}
int abc(int i)
{
return(i++);
}
-
Determine Output:
void main()
{
char a[]="12345";
int i = strlen(a);
printf("%d", ++i);
}
-
Determine Output:
void main()
{
int i;
char a[]="�";
if(printf("%sn", a))
printf("Ok here n");
else
printf("Forget itn");
}
-
Determine Output:
void main()
{
int i=i++, j=j++, k=k++;
printf("%d %d %d", i, j, k);
}
-
Determine Output:
void main()
{
static int i=i++, j=j++, k=k++;
printf("%d %d %d", i, j, k);
}
-
Determine Output:
#define prod(a,b) a*b
void main()
{
int x=3, y=4;
printf("%d", prod(x+2, y-1));
}
-
Determine Output:
void main()
{
char *p;
p="%dn";
p++;
p++;
printf(p-2, 300);
}