#define clrscr() 100
main()
{
clrscr();
printf("%d\n",clrscr());
}
Answers were Sorted based on User's Feedback
Answer / susie
Answer :
100
Explanation:
Preprocessor executes as a seperate pass before
the execution of the compiler. So textual replacement of
clrscr() to 100 occurs.The input program to compiler looks
like this :
main()
{
100;
printf("%d\n",100);
}
Note:
100; is an executable statement but with no
action. So it doesn't give any problem
Is This Answer Correct ? | 44 Yes | 2 No |
Answer / naveen
yes it works and prints 100 because we defined clrscr() to
100. we can also set values to any predefined functions
Is This Answer Correct ? | 20 Yes | 1 No |
int i=10; main() { extern int i; { int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); }
1) int i=5; j=i++ + i++ + i++; printf("%d",j);This code gives the answer 15.But if we replace the value of the j then anser is different?why? 2)int i=5; printf("%d",i++ + i++ + i++); this givs 18.
main() { int a[10]; printf("%d",*a+1-*a+3); }
main() { int i=0; for(;i++;printf("%d",i)) ; printf("%d",i); }
main() { int i = 100; clrscr(); printf("%d", sizeof(sizeof(i))); } a. 2 b. 100 c. 4 d. none of the above
main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcat(a,b)); } a. Hello b. Hello World c. HelloWorld d. None of the above
main() { printf("%d", out); } int out=100;
Write a C program to add two numbers before the main function is called.
void main() { int i=5; printf("%d",i+++++i); }
main() { int x=5; clrscr(); for(;x==0;x--) { printf("x=%d\n”", x--); } } a. 4, 3, 2, 1, 0 b. 1, 2, 3, 4, 5 c. 0, 1, 2, 3, 4 d. none of the above
why nlogn is the lower limit of any sort algorithm?
main() { signed int bit=512, i=5; for(;i;i--) { printf("%d\n", bit = (bit >> (i - (i -1)))); } } a. 512, 256, 128, 64, 32 b. 256, 128, 64, 32, 16 c. 128, 64, 32, 16, 8 d. 64, 32, 16, 8, 4