#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 subtle error in the following code segment? void fun(int n, int arr[]) { int *p=0; int i=0; while(i++<n) p = &arr[i]; *p = 0; }

1 Answers  


main() { printf("\nab"); printf("\bsi"); printf("\rha"); }

3 Answers  


main() { int i =10, j = 20; clrscr(); printf("%d, %d, ", j-- , --i); printf("%d, %d ", j++ , ++i); } a. 20, 10, 20, 10 b. 20, 9, 20, 10 c. 20, 9, 19, 10 d. 19, 9, 20, 10

4 Answers   HCL,


void main() { static int i; while(i<=10) (i>2)?i++:i--; printf(ā€œ%dā€, i); }

2 Answers  


There are 21 people in a room. They have to form groups of 3 people each. How many combinations are possible? Write a C program to print the same.

1 Answers   TCS,






How to swap two variables, without using third variable ?

104 Answers   AB, ADP, BirlaSoft, Cisco, Cygnet Infotech, HCL, Hewitt, Honeywell, HP, IBM, Infosys, Manhattan, Microsoft, Mobius, Percept, Satyam, SofTMware, TCS, Wipro, Yamaha,


why the range of an unsigned integer is double almost than the signed integer.

1 Answers  


Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped

1 Answers   IBM,


#include<stdio.h> main() { int a[2][2][2] = { {10,2,3,4}, {5,6,7,8} }; int *p,*q; p=&a[2][2][2]; *q=***a; printf("%d..%d",*p,*q); }

1 Answers  


to remove the repeated cahracter from the given caracter array. i.e.., if the input is SSAD output should of SAD

6 Answers   Synergy,


Under linux environment can u please provide a c code for computing sum of series 1-2+3-4+5......n terms and -1+2-3+4-5...n terms..

2 Answers  


How to reverse a String without using C functions ?

33 Answers   Matrix, TCS, Wipro,


Categories