#define clrscr() 100

main()

{

clrscr();

printf("%d\n",clrscr());

}

Answers were Sorted based on User's Feedback



#define clrscr() 100 main() { clrscr(); printf("%d\n",clrscr..

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

#define clrscr() 100 main() { clrscr(); printf("%d\n",clrscr..

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

Post New Answer

More C Code Interview Questions

what is the code of the output of print the 10 fibonacci number series

2 Answers  


main() { int i=5; printf("%d%d%d%d%d%d",i++,i--,++i,--i,i); }

7 Answers  


main() { char * strA; char * strB = I am OK; memcpy( strA, strB, 6); } a. Runtime error. b. I am OK c. Compile error d. I am O

4 Answers   HCL,


main() { char *p; int *q; long *r; p=q=r=0; p++; q++; r++; printf("%p...%p...%p",p,q,r); }

1 Answers  


Write out a function that prints out all the permutations of a string. For example, abc would give you abc, acb, bac, bca, cab, cba. You can assume that all the characters will be unique.

5 Answers   IITR, Microsoft, Nike,






How to read a directory in a C program?

4 Answers  


Write a routine that prints out a 2-D array in spiral order

3 Answers   Microsoft,


void main () { int x = 10; printf ("x = %d, y = %d", x,--x++); } a. 10, 10 b. 10, 9 c. 10, 11 d. none of the above

2 Answers   HCL,


how to return a multiple value from a function?

5 Answers   Wipro,


const int perplexed = 2; #define perplexed 3 main() { #ifdef perplexed #undef perplexed #define perplexed 4 #endif printf("%d",perplexed); } a. 0 b. 2 c. 4 d. none of the above

1 Answers   emc2, HCL,


pls anyone can help me to write a code to print the values in words for any value.Example:1034 to print as "one thousand and thirty four only"

2 Answers  


print numbers till we want without using loops or condition statements like specifically(for,do while, while swiches, if etc)!

11 Answers   Wipro,


Categories