# define x=1+4;
main()
{
int x;
printf("%d%d",x/2,x/4);
}
Answers were Sorted based on User's Feedback
Answer / karthik
the preprocessor directive is not written correctly
so u r going to get CE
#define x 1+4
void main()
{
printf("%d%d",x/2,x/4);
}
will work fine and give output as 32
| Is This Answer Correct ? | 4 Yes | 2 No |
Answer / rama krishna sidhartha
The preprocessor syntax is wrongly written. It should be as
follows :
#define x 1+4
void main()
{
printf("%d%d",x/2,x/4);
}
There is no need of declaring the variable 'x' in
between 'main()' function since it is already declared
in '#define' directive.
The output will be : 3 and 2
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / banavathvishnu
x/2 will become 1+4/2=3
x/4 will become 1+4/4 = 2
| Is This Answer Correct ? | 3 Yes | 2 No |
What is Your Name :)
Why we use void main in c?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL
main() { int i; for(i=0;i<5;i++) printf("%d",1l<<i); } why doesn't 'l' affect the code??????
Write a C Program to display the following menu: Menu 1. Display 2. Copy 3. Append 4. Exit Accept the choice (1-4) from the user, and perform the following tasks: Choice 1: Accept a file name from the user and display the file on screen Choice 2: Accept two file names, and copy first file to the second Choice 3: Accept two file names, and append second file to the first file Choice 4: Terminate the program
1 Answers Accenture, Concor, DMU, Satyam, Syntel, Tora,
what is void pointer?
What is the default value of local and global variables in c?
Differentiate between a structure and a union.
Is it better to use malloc() or calloc()?
2.main { int x,j,k; j=k=6;x=2; x=j*k; printf("%d", x);
what is the format specifier for printing a pointer value?
Explain what is wrong in this statement?