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...


Why the below program throughs error during compilation?

#include<stdio.h>
#include<conio.h>
enum
{
ZERO,
ONE,
TWO,
};

main()
{

printf("%d",&TWO);
getch();
}

Answers were Sorted based on User's Feedback



Why the below program throughs error during compilation? #include<stdio.h> #include<con..

Answer / vadivelt

Since memory shall not be allocated for an enum variable,
accessing address of the same is not possible.

ie.,
Below line is invalid, cos u r trying to access the address
of a constant.

printf("%d",&TWO);

Hence the error.

Is This Answer Correct ?    6 Yes 0 No

Why the below program throughs error during compilation? #include<stdio.h> #include<con..

Answer / modassir alam

TWO or any enum variable not hold memory address hence error

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More C Interview Questions

What is structure in c language?

0 Answers  


Explain what is the concatenation operator?

0 Answers  


Explain what is output redirection?

0 Answers  


matrix multiplication fails introspect the causes for its failure and write down the possible reasons for its failurein c language.

5 Answers   TCS,


what is c programming?

3 Answers   TCS,


int i =10 main() { int i =20,n; for(n=0;n<=i;) { int i=10 i++; } printf("%d", i);

6 Answers   HCL, Octal, SW,


here is a link to download Let_Us_C_-_Yashwant_Kanetkar

3 Answers   Microsoft,


Can you write a programmer for FACTORIAL using recursion?

0 Answers   ADP,


Explain how do you convert strings to numbers in c?

0 Answers  


Explain about the constants which help in debugging?

0 Answers  


what is structuer?

4 Answers   LG Soft, Wipro,


To what value are pointers initialized? 1) NULL 2) Newly allocated memory 3) No action is taken by the compiler to initialize pointers.

4 Answers   Aricent,


Categories