General Knowledge :: Testing New
-
Determine Output:
void main()
{
static int i=5;
if(--i){
main();
printf("%d ", i);
}
}
-
Determine Output:
void main()
{
int i=-1, j=-1, k=0, l=2, m;
m = i++ && j++ && k++ || l++;
printf("%d %d %d %d %d", i, j, k, l, m);
}
-
Determine Output:
void main()
{
int i = -1;
+i;
printf("i = %d, +i = %d", i, +i);
}
-
Determine Output:
void main()
{
char *str1 = "abcd";
char str2[] = "abcd";
printf("%d %d %d", sizeof(str1), sizeof(str2), sizeof("abcd"));
}
-
Determine Output:
void main()
{
char not;
not = !2;
printf("%d", not);
}
-
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");
}