The declaration
enum cities{ bethlehem, jericho, nazareth = 1, jerusalem }
assigns the value 1 to
Answer: D
No answer description available for this question.
Enter details here
Comment on the output of this C code?
int const print()
{
printf("AllIndiaExams.in");
return 0;
}
void main()
{
print();
}
Answer: B
None
Enter details here
Which is false?
Answer: A
Since the constant variable has to be declared and defined at the same time, not doing it results in an error.
Hence the statement a is false.
Enter details here
The C declaration
int b [100];
reserves ____________ successive memory locations,each large enough to contain single integer.
Answer: C
No answer description available for this question.
Enter details here
What is the output of this C code?
#include
int main()
{
enum {ORANGE = 5, MANGO, BANANA = 4, PEACH};
printf("PEACH = %d\n", PEACH);
}
Answer: C
In enum, the value of constant is defined to the recent assignment from left.
Output:
$ cc pgm1.c
$ a.out
PEACH = 5
Enter details here
int i = 5; is a statement in a C program.
Answer: C
No answer description available for this question.
Enter details here
printf ( "%d" , printf ( "tim" ) ):
Answer: B
No answer description available for this question.
Enter details here
What is the output of this C code?
int main()
{
const int a;
a = 32;
printf("a is %d", a);
return 0;
}
Answer: B
Since the constant variable has to be declared and defined at the same time, not doing it results in an error.
Enter details here
In case of ordinary int variables
Answer: A
No answer description available for this question.
Enter details here
Consider the following statement
#define hypotenuse (a, b) sqrt (a*a + b*b);
The macro-call hypotenuse (a + 2, b + 3);
Answer: D
No answer description available for this question.
Enter details here