# define x=1+4;
main()
{
int x;
printf("%d%d",x/2,x/4);
}
Answer Posted / 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 |
Post New Answer View All Answers
What is the difference between procedural and functional programming?
How can you be sure that a program follows the ANSI C standard?
Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above
If null and 0 are equivalent as null pointer constants, which should I use?
Why c is called object oriented language?
What is the difference between constant pointer and constant variable?
Explain what is the difference between functions abs() and fabs()?
Which type of language is c?
Explain high-order and low-order bytes.
Is c is a middle level language?
What is c value paradox explain?
What is this pointer in c plus plus?
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.
What are compound statements?
When can a far pointer be used?