Professional Documents
Culture Documents
19btrci031 Udit Pathak Assignment
19btrci031 Udit Pathak Assignment
USN:19BTRCI031
Date of Submission:25/03/2020
Branch/Section:CSE-Artificial Intelligence
4. Which pair of functions below are used for single character I/O?
A. getchar() and putchar() B. scanf() and printf() C. input() and
output() D. None of these
ANS: (A) getchar() and putchar()
17. C is a language
A. High Level B. Low Level C. Middle Level D. Machine Level
ANS: (A) High level language
R:It depends upon the condition,If compared to Python,Java it is
low level
If compared to Assembly launguage it is High.
23. What will be the output of the following C code? (Assuming that
we have entered the value 1 in the
standard input)
void main()
{
char *ch;
printf("enter a value between 1 to 3:");
scanf("%s", ch);
switch (ch)
{
case "1":
printf("1");
break;
case "2":
printf("2");
break;
}
}
A. 1 2. Compile time error 3. 2 4. Run time error
ANS:(B)Compile time error
26. Which of the following data type will throw an error on modulus
operation (%)?
A. char B. short C. int D. float
ANS:(D) float
46. Which numbering format can only represent the ten decimal digits?
A. ASCII B. octal C. BCD D. binary
ANS:(C) BCD
51. C programs are converted into machine language with the help of
A. An Editor B. A compiler C. An operating system D. None of the
above
59. The instructions that tell a computer how to carry out the
processing tasks are referred to as
computer.........
A. programs B. processors C. input devices D. memory modules
ANS:(A)Programs