#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 |
main() { static char names[5][20]={"pascal","ada","cobol","fortran","perl"}; int i; char *t; t=names[3]; names[3]=names[4]; names[4]=t; for (i=0;i<=4;i++) printf("%s",names[i]); }
What is wrong with the following code? int *foo() { int *s = malloc(sizeof(int)100); assert(s != NULL); return s; }
write a c program to input initial & final time in the format hh:mm and find the time intervel between them? Ex inputs are initial 06:30 final 00:05 and 23:22 final 22.30
write a simple calculator c program to perform addition, subtraction, mul and div.
0 Answers United Healthcare, Virtusa,
main() { int i=1; while (i<=5) { printf("%d",i); if (i>2) goto here; i++; } } fun() { here: printf("PP"); }
#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }
Program to find the largest sum of contiguous integers in the array. O(n)
Sir... please give some important coding questions asked by product companies..
Write a program to check whether the number is prime and also check if it there i n fibonacci series, then return true otherwise return false
How to read a directory in a C program?
write a program to Insert in a sorted list
how to delete an element in an array