# 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


Please Help Members By Posting Answers For Below Questions

What is the difference between procedural and functional programming?

515


How can you be sure that a program follows the ANSI C standard?

1124


Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above

655


If null and 0 are equivalent as null pointer constants, which should I use?

575


Why c is called object oriented language?

577






What is the difference between constant pointer and constant variable?

743


Explain what is the difference between functions abs() and fabs()?

613


Which type of language is c?

643


Explain high-order and low-order bytes.

662


Is c is a middle level language?

594


What is c value paradox explain?

570


What is this pointer in c plus plus?

590


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 “****”.

2644


What are compound statements?

622


When can a far pointer be used?

586