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 is malloc() function?

1160


How are structure passing and returning implemented?

1040


How can I find out the size of a file, prior to reading it in?

1177


What is the use of parallelize in spark?

1030


Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record

5215


What is a double c?

987


What is the purpose of void in c?

1067


Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.

1098


How can I remove the leading spaces from a string?

1170


main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }

1438


Compare array data type to pointer data type

1030


What is string function c?

1025


How can you invoke another program from within a C program?

1075


What is sizeof array?

1059


What is the difference between c and python?

1177