#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 |
main(int argc, char **argv) { printf("enter the character"); getchar(); sum(argv[1],argv[2]); } sum(num1,num2) int num1,num2; { return num1+num2; }
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
Write a C program to add two numbers before the main function is called.
#include"math.h" void main() { printf("Hi everybody"); } if <stdio.h> will be included then this program will must compile, but as we know that when we include a header file in "" then any system defined function find its defination from all the directrives. So is this code of segment will compile? If no then why?
main() { unsigned char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
main() { int i=3; switch(i) { default:printf("zero"); case 1: printf("one"); break; case 2:printf("two"); break; case 3: printf("three"); break; } }
How we print the table of 3 using for loop in c programing?
abcdedcba abc cba ab ba a a
Write a program to implement the motion of a bouncing ball using a downward gravitational force and a ground-plane friction force. Initially the ball is to be projected in to space with a given velocity vector
Is there any difference between the two declarations, 1. int foo(int *arr[]) and 2. int foo(int *arr[2])
how can i cast a char type array to an int type array
code of a program in c language that ask a number and print its decremented and incremented number.. sample output: input number : 3 321123