General Knowledge :: Testing New
-
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;
}
}
-
Determine Output:
void main()
{
char string[]="Hello World";
display(string);
}
void display(char *string)
{
printf("%s", string);
}
-
Determine Output:
void main()
{
int i=5;
printf("%d%d%d%d%d", i++, i--, ++i, --i, i);
}
-
Determine Output:
#define square(x) x*x
void main()
{
int i;
i = 64/square(4);
printf("%d", i);
}
-
Determine Output:
void main()
{
char *p="hi friends", *p1;
p1=p;
while(*p!='\0') ++*p++;
printf("%s", p1);
}
-
Determine Output:
#include<stdio.h>
#define a 10
void main()
{
#define a 50
printf("%d", a);
}
-
Determine Output:
#define clrscr() 100
void main()
{
clrscr();
printf("%d", clrscr());
}