#include <stdio.h>
#define a 10
main()
{
#define a 50
printf("%d",a);
}
Answers were Sorted based on User's Feedback
Answer / susie
Answer :
50
Explanation:
The preprocessor directives can be redefined
anywhere in the program. So the most recently assigned value
will be taken.
| Is This Answer Correct ? | 12 Yes | 1 No |
Answer / naveen
it will print the most recently processed value .i.e 50
because the preprossed values can be set anywhere in the
program at any time
| Is This Answer Correct ? | 4 Yes | 0 No |
int i,j; for(i=0;i<=10;i++) { j+=5; assert(i<5); }
How we print the table of 3 using for loop in c programing?
PROG. TO PRODUCE 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
void main() { static int i; while(i<=10) (i>2)?i++:i--; printf(“%d”, i); }
void main() { if(~0 == (unsigned int)-1) printf(“You can answer this if you know how values are represented in memory”); }
char inputString[100] = {0}; To get string input from the keyboard which one of the following is better? 1) gets(inputString) 2) fgets(inputString, sizeof(inputString), fp)
main() { struct date; struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &student.dob.day, &student.dob.month, &student.dob.year); }
#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }
what is variable length argument list?
How to palindrom string in c language?
main() { float i=1.5; switch(i) { case 1: printf("1"); case 2: printf("2"); default : printf("0"); } }
typedef struct error{int warning, error, exception;}error; main() { error g1; g1.error =1; printf("%d",g1.error); }