ADITI Company Programming Program

6. In the program segment in question 5 what is the value of a at the end of the while loop?

Read Solution (Total 0)

ADITI Other Question

Q. In the following program segment

#include
main()
{
int a=2;
int b=9;
int c=1;
while(b)
{
if(odd(b))
c=c*a;
a=a*a;
b=b/2;
}
printf("%dn",c);
}

How many times is c=c*a calculated?
Q. What is the output for the program given below

typedef enum grade{GOOD,BAD,WORST,}BAD;
main()
{
BAD g1;
g1=1;
printf("%d",g1);
}