#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 |
Write a routine that prints out a 2-D array in spiral order
main() { int c=- -2; printf("c=%d",c); }
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
Given a list of numbers ( fixed list) Now given any other list, how can you efficiently find out if there is any element in the second list that is an element of the first list (fixed list)
3 Answers Disney, Google, ZS Associates,
main ( ) { static char *s[ ] = {“black”, “white”, “yellow”, “violet”}; char **ptr[ ] = {s+3, s+2, s+1, s}, ***p; p = ptr; **++p; printf(“%s”,*--*++p + 3); }
main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }
#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr, int)); }
Link list in reverse order.
#include<stdio.h> main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; }
main() { int i=300; char *ptr = &i; *++ptr=2; printf("%d",i); }
All the combinations of prime numbers whose sum gives 32
main() { int i=5; printf("%d%d%d%d%d%d",i++,i--,++i,--i,i); }