Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

# 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 are runtime error?

1136


Explain the process of converting a Tree into a Binary Tree.

2672


What do you mean by Recursion Function?

1130


which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +

1739


What is a char in c?

999


What is spark map function?

1145


What does %c do in c?

996


Why is c so important?

1066


Why is %d used in c?

1007


What are types of preprocessor in c?

1077


Explain what are bus errors, memory faults, and core dumps?

1283


What is a program flowchart?

1213


what is the basis for selection of arrays or pointers as data structure in a program

4310


What is the use of bitwise operator?

1134


What is equivalent to ++i+++j?

1096