0% found this document useful (0 votes)
1K views8 pages

Multiple Choice Questions-Ccp

This document contains 57 multiple choice questions from a Computer Concepts and C programming course at Malnad College of Engineering in Hassan, India. The questions cover topics like computer hardware, operating systems, input/output devices, programming concepts in C like variables, data types, operators, functions etc.

Uploaded by

Sunitha P
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views8 pages

Multiple Choice Questions-Ccp

This document contains 57 multiple choice questions from a Computer Concepts and C programming course at Malnad College of Engineering in Hassan, India. The questions cover topics like computer hardware, operating systems, input/output devices, programming concepts in C like variables, data types, operators, functions etc.

Uploaded by

Sunitha P
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 8

Malnad College of Engineering, Hassan

Department of Computer Science and Engineering


I Semester B.E (Autonomous) in CS & Engg

Computer Concepts and C programming (CS105)


Multiple Choice Questions

1. Any computer is controlled by


a. Hardware b. Information c. User d. Instructions
2. Which of these is a powerful type of personal computer?
a. Workstation b. Notebook c. Mainframe d. Supercompute

3. A computer converts data into


a. Information b. Chart c. Software d. Hardware
4. Personal Computers are also called
a. Minicomputer b. Microcomputer c. Maxicomputer d. Supercomputer
5. Some tablet PC’s can be connected to keyboard and a full size
a. computer b. monitor c. PDA d. Workstation
6. A device that holds a disk is called a
a. Drive b. ROM c. memory d. CPU
7. Software used for tasks such as managing disks and trouble shooting hardware problems
is
a. Application b. Operating System c. Utility d. Compiler
8. Which of the following devices stores instructions that help the computer
startup?
a. Joystick b. ROM c. RAM d. Monitor
9. Which of the following is not an input device?
a. Keyboard b. Microphone c. Mouse d. Speaker

10. One byte is


a. 4 bits b. 8 bits c. 10 bits d. 16 bits
11. Which special keyboard key has a picture of windows logo on it?
a. Start key b. Shortcutkey c. Alternate key d. Enter key
12. The common keyboard arrangement is called
a. QWERTY layout b.QEWRTY layout c.QYWERT layout d.QWERYT
layout
13. In most programs, you can press this key to get help.
a. ESc b. F1 c. ALT d. F10
14. The mouse that uses reflected light to measure its movement is
a. Optical b. Laser c. Mechanical d. Wheel
15. Unlike a transistor, a magnetic disk can store data without a continual source of
a. Electricity b. RPMs c. Polarity d. Laser
16. An example for magnetic storage device
a. Flash memory b. CD ROM c. Hard disk d. Optical
17. The process of mapping magnetic disk surface is called
a. Polarizing b. Charging c. formatting d. Accessing
18. A magnetic disk tracks are divided into smaller parts called
a. clusters b. sectors c. slices d. bytes
19. In a GUI , the window that is currently in use is called
a. Top b. Active c. Biggest d. Framed
20. The operating system is the intermediary between programs and
a. User b. Utilities c. Ether d. Hardware
21. The print head of a dot matrix printer contains a cluster of
a. pins b. dots c. fonts d. character

22. The term dots per inch (dpi) refers to the printers
a. resolution b. speed c. output d. colours
23. Which printers speed is not measured in pages per minute?
a. Ink jet b. Dot mtrix c. laser d. plotter
24. Which type of software can translate scanned text into text that you can edit?
a. OCS b. ORC c. OCR d. ORS
25. Pen based computers are commonly used for
a. Writing lots of text b. Taking pictures c. Data Collection d. Recording sounds

26. What is graphical representation of a solution to a given problem, called?


1. a. Algorithm b. Flowchart c. Icon d. Wizard
27. What does a parallelogram in a flow chart represent?
2. a. Read b. Process c. Start d. Condition
28. What kind of language C is?
3. a. Machine b. Procedural c. Assembly d. Assembly
29. Which language was the predecessor of C?
4. a. CPL b. BCPL c. C-- d. A
30. Which of the following clauses is used for including input output function library in C programs ?
5. a. #include<io.h> b. #include<stdio.h> c. Include#<io.h> d. Include#<stdio.h>
31. Which character marks the end of each statement in C language
6. a. ; b. : c. { d. }
32. Where was C developed?
7. a. Microsoft Corporation b. AT&T Bell Laboratory c. Sun Microsystems d. HP
33. Where does the execution of C program start?
8. a. main( ) b. begin( ) c. start( ) d. initialize()
34. An identifier cannot start with
. a. underscore b. Uppercase alphabet c. Lower case alphabet d. #
35. Which is not a keyword in C?
0. a. const b. main c. sizeof d. total

36. A character constant is written in


1. a. Double quotes b. Single quotes c. parenthesis d. braces
37. A hexa constant is preceded by
2. a. OX b. O c. HX d. H
38. Which is an invalid variable name?
13 a. NET_$ b. BINGO c. _ACCOUNT d. _4
39. Symbolic constants are defined as
4. a. #define s1 100 b. #define s1 100; c. #define s1= 100 d. #define s1= 100;

40. The qualifier that may precede char is


5. a. signed b. double c. long d. Short

41. Identify the escape sequence.


6. a. ‘\0’ b. ‘\n’ c. ‘\f’ d. all
42. The operator % yields
7. a. quotient b. remainder c. percentage d. Fractional part
43. If both the operands of the operator / are integers the result is
8. a. float b. integer c. zero d. undefined
44. Identify the logical operator
9. a. ! b. != c. ~ d. ==
45. What is the output of the following program.
20 main()
{
int x;
x= 3*4/5;
pirntf(“x=%d”, x);
}
a. 0 b. 2 c. 4 d. 2.4
46. What is the output of the following program?
22 main()
{ int a = 10,b;
b=( a >= 5 )? 100 : 200;
printf("%d",b);
}
a. 200 b. 100 c. 10 d. error
47. a = 100;
23 b = 5;
c = a << b << 3;
Assuming the type of all variables to be ‘int’ the value stored in c is
a. 25600 b. 1500 c. 500 d. None
48. int z,x=5,y=-10,a=4,b=2;
24 z = x++ - --y * b / a;
What number will z in the sample code above contain?
a. 10 b. 5 c. 11 d. 6
49. What is the output of the following program?
25 main()
{int x=10,y=20;
x=!x;
y=!x&&!y;
printf(“x=%d y = %d”, x,y);
}
a. 1,1 b. 1,0 c. 10,20 d. 0,0
50. Which of the following functions will take single character input from the keyboard?
26 a. Get( ) b. getch( ) c. Charget( ) d. Givechar( )
Which of the following statements will print the output in two different lines?
a. printf(“Hello You”); b. printf(“\nHello you”); c. printf(“Hello you\n”); d. printf(“Hello \n you”);

52. In which of the following library, does the function, getchar() exist?
. a. Istream.h b. stdio.h c. getchar.h d. function.h
53. Identify formatted console input/output functions.
29 a. getchar() & getch() b. gets() & puts() c. scanf() & printf() d. fgets() & fputs()

54. Identify the correct statement given double x;


3. a. scanf(“%d”, &x); b. scanf(%f”,x) c. scanf(“%d”,*x); d. scanf(“%lf”,&x);
55. What is the output of the following code?
main( )
31
{
printf(“%d”, ’A’ );
}
a. 65 b. a c. A d. Error
56. Which format is used to print character with printf( )?
32 a. %s b. %c c. %d d. %lc
57. What is the purpose of flag + used in printf function?
33 a. Left jstified b. Right justified c. + or – precedes the signed numbers d. centered

58. Which of the following statements is used to access library functions from a header file?
3. a. # link b. #define c. # include d. #add
59. Which of the following characters will be used to print a real number, suppressing the trailing
zeroes?
a. \ b. f c. g d. 0
60. What is the output of the following program?
main()
{
int a = 500, b= 100,c;
if (!a>=400)
b=300;
c=200;
printf(“b=%d\tc=%d”, b,c);
}
a. b=100 c=200 b. b=300 c=200 c. b=200 c=200 d. b=300 c= 300
61. What is the output of the following program?
37 main(void)
{
int a=2;
switch (a)
{
case 0:a=a+2;
case 1:a=a+4;
case 2:a=a+8;
case 3: a=a+6;
default: a=a+32;
}
printf("%d\n",a);
}
a. 10 b. error c. 48 d. 14
62. The default statement is executed when
a. All the case statements are false b.One of the cases is c.One of the cases is false d.All the case
38 true statements are true

63. The keyword else can be used with


. a. if statement b. switch ( ) c. Do..while d. while
64. Which of the following is correct statement for checking a condition in if statement?
. a. if(a=b) b. if(a==b) c. if (a, b) d. if (a b)
65. Each case statement in switch is separated by
1. a. break b. continue c. exit() d. goto
66. In C, "X ? Y : Z " is equivalent to
a. if (X==0) Y ; else Z b. if (X==1) Z ; else Y c. if (X==0) Y ; Z d. if(x==1) Y; else Z;
67. main( )
43 {
int i = -4, j, num = 10;
j = i%-3;
j=( j?0:num*num);
printf(“j = %d”, j );
}
a. 1 b. -1 c. 0 d. 100
68. main( )
44 {
int x =100;
if(!!x)
printf(“x=%d”, !x);
else
printf(“x=%d”,x);
}
a. 100 b. 1 c. 200 d. 0
69. What is the value of int variable result if x=50, y=75, & z=100 ?
Result = ( x < 50 ? y>=75 ? z>100 ? 1:2:3:4);
a. 1 b. 2 c. 3 d. 4
70. for(i=0; i!=10; i+=2)
45 printf(".....");
How many times will it execute?
a. 10 b. 1 c. 5 d. Not even once
71. Where in do while loop, condition is placed?
46 a. At the beginning b. At the end c. In the middle d. No where

72. Which of the following commands will place the program control at the end of the loop, when it
47 gets executed?
a. continue b. break c. end d. All the above

73. What is the output of the following program?


48 main( )
{
int x = 5;
while(x==1)
x= x-1;
printf(“%d\n”, x);
}
a. 1 b. 0 c. -1 d. 5
74. What is the output of the following program?
49 main( )
{
int a = 5;
do
{
printf(“%d\n”, a);
a= -1;
}while (a>0);
a. 5 b. -1 c. 0 d. 4
75. What is the output of the following program?
50 main( )
{
int i;
for(i= -1; i<=10; ++i)
{
if(i<5)
continue;
else
break;
printf(“hello”);
}
}
a. hello b. Nothing is printed c. error d. Infinite loop
76. Which of the following will not form a loop?
. a. for statement b. While statement c. Do while d. two if statements

77. When will a while loop get terminated?


a. When condition is true b. When condition is false c. After 10 d. Depends upon other factors
52 iterations

78. The minimum number of times the do..while loop is executed


53 a. 0 b. 1 c. 2 d. Cannot be predicted
79. main( )
{
54
int x=0;
for(x=1;x<4;x++);
printf(“x=%d\n”,x);
}
What will be printed when the above sample code is executed?
a. X=0 b. X=5 c. X=3 d. X=4
80. How many elements will be there in X[10][5] array?
5. a. 15 b. 5 c. 50 d. 20
81. An array subscript may be
a. integer constant b. integer variable c. integer expression d. all of these
6.
82. The array elements are represented by
7. a. Index value b. Subscripted variables c. Array name d. Size of an array
83. Identify the correct declaration
60 a. int a[10][10]; b. int a[10,10] c. int a(10)(10); d. int a(10,10)

84. Identify the wrong expression given an integer array int a[10];
61 a. a[-1] b. a[10] c. a[0] d. ++a
85. What is the value of a[0][2] in the declaration int a[3][4]={{1,2},{4,8,15}} ?
2. a. 4 b. 2 c. 0 d. Not defined
86. int prime[7]= {2, 3 ,5, 7, 11, 13};
The size of the array ‘prime’ assuming ‘int’ variables to occupy 2 bytes is
6 a. 14 b. 12 c. 6 d. None of these

87. Strings are terminated using


5 a. ‘\n’ b. ‘\0’ c. ‘\b’ d. ‘\t’
88. Built in string function to concatenate two strings is
66 a. strcat( ) b. strconcat ( ) c. strcan ( ) d. strcon ( )

89. main()
67 {
static char s[ ]= “MCE HASSAN”;
printf(“%s\n”, s+5);
}
a. ASSAN b. HASSAN c. MCE HASSAN d. MCE
90. What does strcat( ) append to the target string after concatenation.
8. a. Nothing b. \t c. \0 d. -0
91. The function strcpy (s1,s2)
a. Copies s1 to s2 b. Copies s2 to s1 c. Appends s1 to the end of s2 d. Appends s2 to the end of
9. s1

92. The operator used to access the structure member is


69 a. * b. & c. . d. [ ]
93. The default return data type in function definition is
1. a. int b. float c. char d. Void
94. What function must all C programs have?
2. a. start( ) b. return ( ) c. main ( ) d. exit ( )
95. Structure is a data type in which
75 a. Each element must b. Each element must c. Each element can d. No element is
have same data type have pointer data type have different data type defined

96. The keyword used to represent a structure data type is


78 a. structure b. strut c. struct d. str

97. If one or more members of structure are other structures, the structure is known as
9. a. Nested b. compo c. Self referential d. unstructured
98. The operators exclusively used in pointers are
1. a. * and / b. & and * c. & and | d. - and >
99. A pointer value refers to
a. Integer constant b. Float value c. Valid address in memory d. Ordinary variable
82

100. The correct way to declare a pointer


85 a. int *ptr; b. * int ptr; c. int prt *; d. int_ptr s;

You might also like