#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 |
Write a program using one dimensional array to assign values and then display it on the screen. Use the formula a[i]=i*10 to assign value to an element.
1 Answers Samar State University,
#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr, int)); }
main() { char not; not=!2; printf("%d",not); }
int i,j; for(i=0;i<=10;i++) { j+=5; assert(i<5); }
plz tell me the solution.......... in c language program guess any one number from 1 to 50 and tell that number within 8 asking question in yes or no...............
How do you sort a Linked List (singly connected) in O(n) please mail to pawan.10k@gmail.com if u can find an anser...i m desperate to knw...
6 Answers Microsoft, MSD, Oracle,
void main() { int const * p=5; printf("%d",++(*p)); }
3 Answers Infosys, Made Easy, State Bank Of India SBI,
#include <stdio.h> int main(void) { int a=4, b=2; a=b<<a+b>>2 ; printf("%d",a); return 0; }
void main() { char ch; for(ch=0;ch<=127;ch++) printf(“%c %d \n“, ch, ch); }
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,
program to Reverse a linked list
12 Answers Aricent, Microsoft, Ness Technologies,
What is the output for the program given below typedef enum errorType{warning, error, exception,}error; main() { error g1; g1=1; printf("%d",g1); }