# 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 |
Find the largest number from the given 2 numbers without using any loops and the conditional operator.
If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402
the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above
What are types of structure?
Write a function that accepts a sentence as a parameter, and returns the same with each of its words reversed. The returned sentence should have 1 blank space between each pair of words. Demonstrate the usage of this function from a main program. Example: Parameter: “jack and jill went up a hill” Return Value: “kcaj dna llij tnew pu a llih”
plz answer.... write a program that reads line (using getline) e.g."345", converts each line to an integer using "atoi" and computes the average of all the numbers read. also compute the standard deviation.
which of the following go out of the loopo if expn 2 becoming false a.while(expn 1){...if(expn 2)continue;} b.while(!expn 1){if(expn 2)continue;...} c.do{..if(expn 1)continue;..}while(expn 2); d.while(!expn 2){if(expn 1)continue;..}
EXPLAIN #INCLUDE<STDIO.H> EXPLAIN #INCLUDE<CONIO.H>
34.what are bitwise shift operators? 35.what are bit fields? What is the use of bit fields in a structure declaration? 36.what is the size of an integer variable? 37.what are the files which are automatically opened when a c file is executed? 38.what is the little endian and big endian? 39.what is the use of fflush() function? 40.what is the difference between exit() and _exit() functions? 41.where does malloc() function get the memory? 42.what is the difference between malloc() and calloc() function? 43.what is the difference between postfix and prefix unary increment operators?
What is the difference between malloc() and calloc() function in c language?
What is 02d in c?
What is class and object in c?