#define a 10

int main()
{
printf("%d..",a);
foo();
printf("%d..",a);
return 0;
}
void foo()
{
#undef a
#define a 50
}

Answers were Sorted based on User's Feedback



#define a 10 int main() { printf("%d..",a); foo(); printf("%d..&quo..

Answer / ilakkiyakandasamy

10..10..

Is This Answer Correct ?    2 Yes 0 No

#define a 10 int main() { printf("%d..",a); foo(); printf("%d..&quo..

Answer / ilakkiyakandasamy

10..10..

Is This Answer Correct ?    0 Yes 0 No

#define a 10 int main() { printf("%d..",a); foo(); printf("%d..&quo..

Answer / mansi

10..10

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Code Interview Questions

plz send me all data structure related programs

2 Answers  


main() { register int a=2; printf("Address of a = %d",&a); printf("Value of a = %d",a); }

3 Answers  


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

2 Answers  


given integer number,write a program that displays the number as follows: First line :all digits second line : all except the first digit . . . . Last line : the last digit

8 Answers  


How we print the table of 2 using for loop in c programing?

14 Answers   HCL, Wipro,






How to use power function under linux environment.eg : for(i=1;i<=n;i++){ pow(-1,i-1)} since it alerts undefined reference to 'pow'.

2 Answers  


Write a program that reads a dynamic array of 40 integers and displays only even integers

2 Answers  


A program that will create a movie seat reservation. The program will display the summary seats and its status. The user will be ask what seat no. to be reserved, then it will go back again to the summary to display the updated seat status. If the seat no. is already reserved then it will prompt an error message. And also if the input seat no is out of range then it will also prompt an error message. The program is continuously running. Termination of the program will depends on how the programmer will apply. Sample output: Movie Seats Reservation Summary of Seats: Seat 1: Available Seat 2: Available Seat 3: Available Seat 4: Available Seat 5: Available Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 1 Movie Seats Reservation Summary of Seats: Seat 1: Reserve Seat 2: Available Seat 3: Available Seat 4: Available Seat 5: Available Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 6 The Seat no. is out of range! Movie Seats Reservation Summary of Seats: Seat 1: Reserve Seat 2: Available Seat 3: Available Seat 4: Available Seat 5: Available Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 1 The Seat no. is already reserved! Movie Seats Reservation Summary of Seats: Seat 1: Reserve Seat 2: Available Seat 3: Available Seat 4: Available Seat 5: Available Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 0 GoodBye... Thank You!!!

0 Answers  


main() { int i =0;j=0; if(i && j++) printf("%d..%d",i++,j); printf("%d..%d,i,j); }

1 Answers  


Write a C program to print look and say sequence? For example if u get the input as 1 then the sequence is 11 21 1211 111221 312211 12112221 .......(it counts the no. of 1s,2s etc which is in successive order) and this sequence is used in run-length encoding.

1 Answers  


Print an integer using only putchar. Try doing it without using extra storage.

2 Answers  


hello sir,is there any function in C that can calculate number of digits in an int type variable,suppose:int a=123; 3 digits in a.what ll b answer?

6 Answers  


Categories