#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

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

1 Answers   Cognizant, lenovo,


Give a one-line C expression to test whether a number is a power of 2.

10 Answers   Microsoft,


There is a lucky draw held every day. if there is a winning number eg 1876,then all possible numbers like 1867,1687,1768 etc are the numbers that match irrespective of the position of the digit. Thus all these numbers qualify fr the lucky draw prize Assume there is no zero digit in any numbers. write a program to show all the possible winning numbers if a "winning number"is passed as an arguments to the function.

1 Answers   Nagarro,


main() { int i =10, j = 20; clrscr(); printf("%d, %d, ", j-- , --i); printf("%d, %d ", j++ , ++i); } a. 20, 10, 20, 10 b. 20, 9, 20, 10 c. 20, 9, 19, 10 d. 19, 9, 20, 10

4 Answers   HCL,


What is the subtle error in the following code segment? void fun(int n, int arr[]) { int *p=0; int i=0; while(i++<n) p = &arr[i]; *p = 0; }

1 Answers  






#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr, int)); }

1 Answers  


Write a program to receive an integer and find it's octal equivalent. How can i do with using while loop.

2 Answers  


Write a C function to search a number in the given list of numbers. donot use printf and scanf

5 Answers   Honeywell, TCS,


How will u find whether a linked list has a loop or not?

8 Answers   Microsoft,


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

0 Answers  


Sorting entire link list using selection sort and insertion sort and calculating their time complexity

1 Answers   Infosys, Microsoft, NetApp,


Printf can be implemented by using __________ list.

3 Answers  


Categories