#define MAX 3
main()
{
printf("MAX = %d \n",MAX );
#undef MAX
#ifdef MAX
printf("Vector Institute”);
#endif
Answers were Sorted based on User's Feedback
Answer / poorna
Initially the max is defined so the first statement printf prints max=3,
#undef used to remove all the defined terms.so the max is not defined after this step.
So the if statement became false hence answer is Max=3
| Is This Answer Correct ? | 27 Yes | 3 No |
Answer / shaik anif
main()
{
int a[3][4] ={1,2,3,4,5,6,7,8,9,10,11,12} ;
int i, j , k=99 ;
for(i=0;i<3;i++)
for(j=0;j<4;j++)
if(a[i][j] < k) k = a[i][j];
printf("%d", k);
}
| Is This Answer Correct ? | 8 Yes | 6 No |
4.weight conversion: Write a program that will read weight in pounds and convert it into grams.print both the original weight and the converted value.There are 454 grams in a pound.design and carry out a test plan for this program.
I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.
What is the difference between declaring a variable by constant keyword and #define ing that variable?
Where static variables are stored in c?
write a pgm to print 1 1 2 1 1 2 3 2 1 1 2 3 4 3 2 1
write a programme to convert temperature from farenheit to celcius?
What will be the output of x++ + ++x?
What is the mean of function?
Why main is not a keyword in c?
while initialization of two dimensional arrays we can initialize like a[][2] but why not a[2][] is there any reason behind this?
write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.
Why dont c comments nest?