Language Processor & Data Types A
Language Processor & Data Types A
ENGINEERING
C Programming
Topic Question
Topic Solution
[MCQ]
#Q. Consider the following declarations:
P: signed short x;
Q: unsigned long long int x;
Which of the given declarations is/are CORRECT?
A Only P B Only Q
C –128 D 141
[MCQ]
#Q. Consider the following function:
#include <stdio.h>
int main()
{
char ch = –134;
printf("%c", ch);
return 0;
}
The output is-
A A B Garbage
C Compiler Error D z
[NAT]
#Q. Consider the following program:
#include <stdio.h>
int main()
{
char ch=125;
ch=ch+6;
printf("%d", ch);
return 0;
}
The output is- ____________.
[NAT]
#Q. Consider the following program:
#include <stdio.h>
int main()
{
int x=-32769;
printf("%d", x);
return 0;
}
(Assume integer is of 2 bytes)
The output is: ____________.
[MCQ]
#Q. Consider the following two statements:
P: C standard specifies fixed number of bytes for every data type.
Q: The size order for int, short and long data type is short<int<long
Which of the following statements is/are CORRECT?
A Only P B Only Q