CS & IT
ENGINEERING
C Programming
Language Processor & Data Types and Operators
DPP 01 Discussion Notes By- Devvrat Tyagi Sir
Topics to be Covered
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 Both P and Q D Neither P nor Q
[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 value printed is- ____________.
[MCQ]
#Q. Consider the following program:
#include <stdio.h>
int main()
{
char ch=141;
printf("%d", ch);
return 0;
}
The output is-
A Compiler Error B –115
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
C Neither P nor Q D Both P and Q
[MCQ]
#Q. In C programming language, after executing the following code what
are the values of x, y and z?
int x, y = 10, z = 12;
x = y ++ + z ++;
A x = 22, y = 10, z = 12 B x = 24, y = 10, z = 12
C x = 24, y = 11, z = 13 D x = 22, y = 11, z = 13
THANK - YOU