Literal means
Answer: B
No answer description available for this question.
Enter details here
What is the output of this C code?
#include
enum birds {SPARROW, PEACOCK, PARROT};
enum animals {TIGER = 8, LION, RABBIT, ZEBRA};
int main()
{
enum birds m = TIGER;
int k;
k = m;
printf("%d\n", k);
return 0;
}
Answer: D
m is an integer constant, hence compatible.
Output:
$ cc pgm5.c
$ a.out
8
Enter details here
What will be the output of the following C++ code?
#include
using namespace std;
int main()
{
int const p = 5;
cout << ++p;
return 0;
}
Answer: C
We cannot modify a constant integer value.
Enter details here
What is the output of the following 'C' program?
main
{
extern int i;
i = 20;
print("%d",size of (i));
}
Answer: D
No answer description available for this question.
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
How to declare a wide character in the string literal?
Answer: A
It can turn this as the wide character instead of narrow characters.
Enter details here
When a variable of data type double is converted into float, then
Answer: A
No answer description available for this question.
Enter details here
What is the output of this C code?
#include
int main()
{
printf("sanfoundry\r\nclass\n");
return 0;
}
Answer: B
No answer description available for this question.
Enter details here
In a C program constant is defined
Answer: C
No answer description available for this question.
Enter details here
What are the parts of the literal constants?
Answer: D
Because these are the types used to declare variables and so these can be declared as constants.
Enter details here