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=0; while(a<5) printf("%d\n",a++); how many times does the loop occurs? a.infinite b.5 c.4 d.6
Example of friendly function in c++
main() { int x=2, y=4 if ((x==2||y==4) x++ y++ if (y==4+1) { x=x+y; } y++; printf("The values of x and y are %d and %d."x,y); } What is the output?
how to print this sereis 2 4 3 6 5..........?
In the below code, how do you modify the value 'a' and print in the function. You'll be allowed to add code only inside the called function. main() { int a=5; function(); // no parameters should be passed } function() { /* add code here to modify the value of and print here */ }
What is wrong with this program statement?
int a=2,b=3,c=4; printf("a=%d,b=%d\n",a,b,c); what is the o/p?
What is a program flowchart and explain how does it help in writing a program?
int main() { int i=-1,j=-1;k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d%d%d%d%d",i,j,k,l,m); }
What is mean by data types in c?
How can I implement sets or arrays of bits?
to write a program, that finds the minimum total number of shelves, including the initial one, required for this loading process. The packets are named A, B, C, D, E …….. Any numbers of packets with these names could be kept in the shelf, as in this example: [ZZLLAAJKRDFDDUUGGYFYYKK]. All packets are to be loaded on cars. The cars are lined in order, so that the packets could be loaded on them. The cars are also named [A, B, C, D, E,………….].