#include <stdio.h>

#define a 10

main()

{

#define a 50

printf("%d",a);

}

Answers were Sorted based on User's Feedback



#include <stdio.h> #define a 10 main() { #define a 50 prin..

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

#include <stdio.h> #define a 10 main() { #define a 50 prin..

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

Post New Answer

More C Code Interview Questions

Is it possible to type a name in command line without ant quotes?

1 Answers   Excel, Infosys,


Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like.

21 Answers   ABC, eBay, Goldman Sachs, Google, HUP, Microsoft, TATA,


#include<stdio.h> main() { const int i=4; float j; j = ++i; printf("%d %f", i,++j); }

1 Answers  


x=2 y=3 z=2 x++ + y++; printf("%d%d" x,y);

2 Answers  


Link list in reverse order.

8 Answers   NetApp,






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)

1 Answers  


main() { main(); }

1 Answers  


Write a procedure to implement highlight as a blinking operation

2 Answers  


void main() { int *mptr, *cptr; mptr = (int*)malloc(sizeof(int)); printf(ā€œ%dā€,*mptr); int *cptr = (int*)calloc(sizeof(int),1); printf(ā€œ%dā€,*cptr); }

1 Answers  


main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); }

2 Answers   Wipro,


main() { char *p; int *q; long *r; p=q=r=0; p++; q++; r++; printf("%p...%p...%p",p,q,r); }

1 Answers  


How to count a sum, when the numbers are read from stdin and stored into a structure?

1 Answers  


Categories