enum DAY
{
sunday,
monday,
tuesday
};
enum EDAYS
{
friday,
saturday,
sunday
};
void main()
{
int i =0;
if( i == sunday)
{
printf("%d",i);
}
}
what would be the output?
Answers were Sorted based on User's Feedback
Answer / shankar
Multiple declaration for 'sun'
An error comes!!!!!!
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / mukesh_biswajeet
The Answer or output is 0
Sunday is at zero[0] positon in Enum Day
and therefore the condition becomes true and
the initialised value of i is printed.
| Is This Answer Correct ? | 0 Yes | 2 No |
a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.
#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE"); }
#include<stdio.h> main(0 { printf("\n %d %d %d",sizeof(3),sizeof("3"),sizeof(3)); }
Describe the header file and its usage in c programming?
How to add two numbers without using semicolon n c????
4) Write a program that takes a 5 digit number and calculates 2 power that number and prints it.
What are the types of macro formats?
Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.
what is different between auto and local static? why should we use local static?
What does sizeof int return?
Why should I prototype a function?
Explain what is wrong with this statement? Myname = ?robin?;