C PRGRMNG MCQ PDF
C PRGRMNG MCQ PDF
FPL-I
Mr. PAWAR A. B.
STESs
PART A
UNIT I Introduction to Computers
Q.1 ALU stands for
(b) Memory
(a) ALU
(c) CPU
(d) None of above
Q.3 What difference does the 5th generation computer have from other generation computers?
(a) Technological advancement
(b) Scientific code
(c) Object Oriented Programming
(d) All of the above
(a)ANSI
(b) ASCII
(c) EBCDIC
(d) ISO
Q.6 Which device is used as the standard pointing device in a Graphical User Environment
(a) Keyboard
(b) Mouse
(c) Joystick
(d) trackball
Q.8 The section of the CPU that is responsible for performing mathematical operations
(a)Memory
(b) Register Unit
(c)Control Unit
(d)ALU
(e) None of the above
Q.9 Any storage device added to computer beyond the immediately usable main storage is known as:
(a)Floppy disk
(a)Open Source
Source
(b) Closed
(c)Proprietary
(d) Licensed
(b) Mouse
(c)Printer
(d) Joystick
(a) True
(b) False
(a)Task Manager
(a)Compiler
(b)Power Point
(c)Debugger
(a)Linux
(b)Word
(c)Excel
(d)Tally
Q.17 The Programs which are as permanent as hardware and stored in ROM is known as
(a)Hardware
(b)Software
(c)Firmware
(d)ROMware
Mr. Pawar A. B.
(a)Printer
(b)VDU
(c)Scanner
(d)All
(a)True
(d)All
(b)False
(a)True
(b)False
(a)ALU+CU
(b)ROM+ALU
(c)RAM+ROM
(d)None
(c)RAM
(d)None
(a)ROM
(b)EPROME
(a)RAM
(b)EERAM
(d)PROME
(c)ROM
(a)GB
(b)MB
(c)KB
(d)All
(a)True
(b)False
(a)Android
(d)LINUX
(c)Samsung
(b) MAC
(a)True
(b)False
(b)Second
(d)System s/w
(d)Fourth
(c)Third
(a)CPU
(b)VDU
(d)Scanner
(c)Printer
(a)Software
(b)Hardware (c)Program
(d)None of this
(a)Scanner
(b)VDU
(d)None of this
(c)Software
(a)True
(b)False
(a)True
(b)False
Q.39 Keyboard Converts typed in character to
___________code
(a)EBCIDIC
(b)ASCII
(c)Decimal
(d)Binary
(a)ALU
(b)RAM
(c)CU
(d)BU
Q.41 Which one of the following is not a feature of third generation languages?
(a) They need to get translated
(b) They are faster than MLLs
(c) They are easy to use than MMLs
(d) They use compilers and interpreters
Q.42 Which is the type of memory for information that does not change on your computer?
(a)RAM
(b)RAM
(c)ERAM
(d)RW/RAM
Prepared By:-
Mr. Pawar A. B.
(b)Second
(c)Third
(d)Fourth
(a)Accuracy
(b)Storage
(c)Versatility (d)Automatic
Q.45 Which of the following is not the classification of computers based on application?
(a) Electronic Computers
(b)Analog Computers
(c)Digital Computers
(d)Hybrid Computers
Answer Keys
QUE NO
ANS
QUE
ANS
QUE
NO
A
B
A
A
C
C
A
C
B
1
6
11
16
21
26
31
36
41
ANS
NO
C
C
C
C
A
C
C
B
D
2
7
12
17
22
27
32
37
42
QUE
ANS
NO
D
D
C
C
B
D
D
A
C
3
8
13
18
23
28
33
38
43
4
9
14
19
24
29
34
39
44
QUE
ANS
NO
D
A
D
B
B
B
A
B
B
5
10
15
20
25
30
35
40
45
B
A
B
B
A
C
C
C
B
(c)Linux OS
(d)None
(b)False
(a)True
Q.3 Bash is the ___________
(a)Shell
(c)None
(b)Compiler
(a) NASA
(d)NASDAQ
(c)C-DAC
(b)IUCCA
(a)Mandrake
(b)SUSE
(c)Fedora
(d)Debian
(a)True
(b)False
(a)True
(b)False
(a)Browser
(b)Editor
(c)Compiler
(d)None of Above
(c)Editor
(a)Compiler
(b)OS
(a)True
(b)False
(a)Open Source
(b)Closed Source
(c)Browser
(d)All of above
Prepared By:-
Mr. Pawar A. B.
(a)True
(b)False
Q.13 Which of the following command gives the list of the users in the systems
(a)whoami
(b)ps
(c)ds
(d)who
(a)Knopix
(b)SUSE
(c)Fedora
(d)Ubuntu
(d)None
(a)True
(b)False
(a)Linux
(b)Windows
(c)MAC
(d)Android
(a)Mozilla Firebox
(b)IE
(c)Opera
(d)None
(a)USA
(b)UK
(c)India
(d)China
(a)3D Max
(b)Blender
(c)Linux
(d)Android
(a)True
(b)False
(a)rpm
(b)make
(c)yum
(d)None of above
(a)who
(b)tty
(d)sudo
(c)chmod
Q.24 ________ is used to install and remove packages and control downloading them from a repository
(a)rpm
(b)who
(c)yum
(d)Is
(a)Mandrake
(c)Redhat
(d)Fedora
(b)SUSAN
(a)File achiever
(b)Web browser
(c)Editor
(d)None of above
(a)True
(b)False
(a)Lucene
(c)Perl
(b)Fedora
(d)Apache
(a)True
(b)False
(a)C-shell
(b)D-shell
(c)K-shell
(d)None of above
(a)UNIX
(b)DOS
(c)System software
(d)Application software
(a)Hardware
(c)Software which performs computation
(d)None
Mr. Pawar A. B.
Answer Key
QUE NO ANS
1 B
7
8
9
10
11
12
2 B
3 A
4 C
5 D
6 B
B
A
D
A
B
B
13
14
15
16
17
18
D
A
B
B
B
C
19
20
21
22
23
24
C
A
A
B
D
A
25
26
27
28
29
30
B
A
B
D
A
A
31 A
32 B
33 D
(a)C
(b)c++
(d) python
(c) java
(a)true
(b)false
(a)compiler
(c)IDE
(b)Debugger
Q.5.Source code for python is freely available.
(a)true
(d)Interpreter
(b)false
(b)false
(a)true
(a)true
(b)false
(a)true
(b)false
(a)true
(b)false
(a)true
(b)false
Answer Key
QUE
ANS
QUE
NO
1
2
C
B
NO
3
4
ANS
B
C
QUE
ANS
QUE
ANS
NO
5
6
A
B
NO
7
8
B
A
QUE
ANS
NO
9
10
A
A
(a)C
(b)Lisp
(c)Fortan
(d)Basic
Q.2 The primary progenitor of COBOL was the programming language known as:
(a)Pseudocode
(b)short
Code (C) speedcode
(d)flow-matic.
Prepared By:-
Mr. Pawar A. B.
(a)compiled
(b)Interpreted
(d)script
(c)Hybird
(a)functional
(b)object-oriented
(c)rule-based.
(d)imperative.
Q.7 When did the first ANSI programming language stander d come out?
(a)1949
(b)1975
(c)1958
(d)1966
Q.8 List in chronological order, when these languages become officially recognized as a standard
(i)ANSI C
(ii)ANSI COMMON LISP
(iii)ANSI Cobol
(iv)ANSI ADA
(a)i,ii,iii,iv
(b)i ,iii,ii,iv
(c)iv,iii,I,ii
(d)I,iv,iii,ii
(i)Processors
(a)i,ii & iii only
(ii)Technicians
(b)ii & iv only
(iii) Students
(iv)Managers
(c)iii & iv only
(d)all of the above
(d) iv only
Q. 12 What is/are the main differences between the 3rd and 4th generation languages?
Q. 13 Which of the features below would make the next generation of PL popular?
(i) They are highly portable and are offered on a wide range of systems .
(ii) They are suitable for development of programs of arbitrary size and complexity.
(iii) They are reasonably stable during changes in hardware and system software.
(iv) They both have procedural and non-procedural features.
(a) i & ii only.
(b) i, iii & iv
(c) iii & iv only
(d) All of the above
Q. 14 Which of the following languages has the potential to become the next programming language
standard?
(i) Java
(iii) Cobol 97
(a) i & iv only
(ii) Html
(iv) ADA 95
(b) ii & iii only
(d) none of the above
Prepared By:-
Mr. Pawar A. B.
(a) Assembler
(b) Compiler
(c) Linker
(d) Loader
Q. 23 What is the name of the category of programming languages whose structure is dictated by the von
Neuman computer architecture?
(a) Imperative
(b) Denotational
(c) Functional
(d) Non-procedural
(e) Constraint
(f) Object-oriented
Q. 24 A paradigm that allows specification of what has to be computed rather than just how a
computation is to be carried out.
(a) Imperative
(b) Denotational
(c) Functional
(d) Non-procedural
(e) Constraint
(f) Object-oriented
Q. 25 A paradigm incorporating encapsulation. Inheritance and dynamic type binding.
(a) Imperative
(c) Functional
(e) Constraint
(b) Denotational
(d) Non-procedural
(f) Object-oriented
(a) FORTRAN
(c) LISP
(e) JAVA
(b) COBOL
(d) C
(f) SMALLTALK
(a) FORTRAN
(c) LISP
(e) JAVA
(b) COBOL
(d) C
(f) SMALLTALK
Q. 28 What programming language has dominated scientific computing over the past 35 years?
(a) FORTRAN
(c) LISP
(e) JAVA
(b) COBOL
(d) C
(f) SMALL TALK
Q. 29 What programming language has dominated artificial intelligence programming over the past
35years?
(a) FORTRAN
(c) LISP
(e) JAVA
(b) COBOL
(d) C
(f) SMALL TALK
Prepared By:-
Mr. Pawar A. B.
Q.30 What programming language has dominated business applications over the past 35 years?
(a) FORTRAN
(e) JAVA
(b) COBOL
(f) SMALL TALK
(c) LISP
(d) C
(a) FORTRAN
(c) LISP
(e) JAVA
(b) COBOL
(d) C
(f) SMALLTALK
(let ((n 4)
(f (add-n 3))) (+ n (f 2)))
Q.34 What does this program print?
(a) 8
(b) 9
(c) 10
Q.35 What would the program print if Scheme used dynamic scope and shallow binding?
(a) 8
(b) 9
(c) 10
Q.36 What would be the program print if scheme used dynamic scope and deep binding?
(a) 8
(b) 9
(c) 10
Q.37 The fact that the program contains two variables named n is an example of
(a)Overloading
(b)Aliasing
(c)Both
(d)neither
Q.38 What would happen (in real scheme) if we reversed the order of the two definitions in the let block?
(a)Nothing: the program would behave the same
(b)The output would change,because f would capture a different n
(c)The interpreter would complain that n is being used before it is declared
(d) The interpreter would complain that the meaning of n is ambiguous
Q.39 Which of the following is not an example of a high-level programming language?
(a)Machine language
(b) High level language
(c)Assembly language
(d)Natural language
Q.40 Which of the following is not an example of a high-level programming language?
(a)C++
(b)PASCAL
(c)Babbage
(d)BASIC
(a)FORTRAN
(b)BASIC
(c)PASCAL
(d)B and C
(d) All
Q. 43 Java is a
(d)None
Prepared By:-
Mr. Pawar A. B.
(b)Text Operation
(d)None
(a) C
(b) Java
(d) None
(c) C++
Q.46 FORTRAN is a
(d)None
Q. 49 Structured programming languages are also known as
(a) Modular
(b) Case sensitive
(c) Pseudocode
Q. 50 Which of the following is a case sensitive language?
(a) C++
(b)Pascal
(c) BASIC
(d)All
Q.51 Which of the following factors should be considered while selecting a programming language for
application development?
(a) Nature of the application
(b) Ease of learning the language
(b)Familiarity with the
(d) All
language
Q.52Which of the following is best suited for system-level programming
(a) BASIC
(b) C
(c) FORTRAN
(d) none
(d) None
(a) Matrix(A,3,3)
(b) A(3,3)
(c) A[123,123,123]
(d) A[123; 123; 123]
Q. 58 Transpose of matrix A can be calculated by:
(a) A'
(b) inv(A)
(c) A"
(d) Trans(A)
(d) None
Prepared By:-
Mr. Pawar A. B.
10
Q.61 The tool used by a programmer to convert a source program to a machine language object module is a
(a) Compiler
(b)Language translator
(c) Linker
(d)Preprocessor
ANSWER KEY
QUE
QUE
NO
1
2
3
4
5
ANS
C
D
B
C
B
6 D
7 C
8 C
9 D
10 C
NO
11
12
13
14
15
16
17
18
19
20
QUE
ANS
D
B
D
C
A
A
A
D
A
A
QUE
NO
21
22
23
24
25
26
27
28
29
30
QUE
QUE
ANS NO
ANS NO
ANS NO
ANS
C
31 E
41 A
51 D
A
32 A
42 A
52 B
A
33 B
43 C
53 A
D
34 B
44 D
54 A
F
35 C
45 B
55 C
E
36 B
46 C
56 A
D
37 D
47 A
57 D
A
38 A
48 C
58 A
C
39 D
49 A
59 C
B
40 C
50 D
60 B
61 A
(c)patent
(d)Need document
(a)Users
(b)Coders
(c)Mangers
(a)Users
(d)Resources required
(a)Internet
(b)Online
(c)Find
(d)Help
(a)Testing
(b)Delivery
(c)Idea
(d)Development
(a)Patent
(d)ITU-T
(c)Architecture Document
(d)Technical Document
(a)Documentation
(b)Typing
(c)Letter Typing
(d)Technical Documentation
Q.10 Latex automatically generates_________
(c)Both a and b
(a)Indexes
(b)Bibliography
Q.11 First command in LATEX for any document is_____
(a)\begin
(b)\documentclass
(c)\begin{article}
(d)Title
(d)\end
Prepared By:-
Mr. Pawar A. B.
11
(a)PDF
(b)dvi
(c)ps
(c)//
(d)%
(a)\comments
(b)/* */
(d)title only
(a)lq
(b)rq
(c)
(d)both a & b
(c)plm
(d)+/-
(a)plusminus
(b)pm
(a)begin
(b)begin{trigonometry}
(c)begin{alpha}
(d)begin{math}
(b)end{center}
(d)end
(c)end{flushleft}
Q.20 to create effect of pressing Enter key in the document use __________
(a)\newline
(b)newline
(c)\new
(d)\enter
(a)\column2
(b)\2column (c)\twocolumn
(d)\enter
This is example for creating new paragraph in latex. It simply requires to add an extra newline. Because of this
simple way the writer does have to worry about indentation.
This is now bit complex. I have left an extra line, you can see the effect in output for the same.try to read the
section properly in the chapter, you will get the clue.
\end{document}
(a)
This is example for creating new paragraph in latex. It simply requires to add an extra newline. Because
of this simple way the writer does have to worry about indentation.
This is now bit complex. I have left an extra line, you can see the effect in output for the same.try to read the
section properly in the chapter, you will get the clue..
(b)
This is example for creating new paragraph in latex. It simply requires to add an extra newline. Because
of this simple way the writer does have to worry about indentation.
This is now bit complex. I have left an extra line, you can see the effect in output for the same.try to read the
section properly in the chapter, you will get the clue.
This will again make you think.
(c)
This is example for creating new paragraph in latex. It simply requires to add an extra newline. Because
of this simple way the writer does have to worry about indentation.
This is now bit complex. I have left an extra line, you can see the effect in output for the same.try to read the
section properly in the chapter, you will get the clue.
(d)
Prepared By:-
Mr. Pawar A. B.
12
This is example for creating new paragraph in latex. It simply requires to add an extra newline. Because
of this simple way the writer does have to worry about indentation.
This is now bit complex. I have left an extra line, you can see the effect in output for the same.try to read the
section properly in the chapter, you will get the clue. This will again make you think.
ANSWER KEY
QUE NO
1
2
3
4
5
21
ANS
B
D
B
C
D
C
QUE NO
6
7
8
9
10
22
ANS
A
A
C
A
C
C
QUE NO
11
12
13
14
15
ANS
B
D
D
A
D
QUE NO
16
17
18
19
20
ANS
B
C
D
C
Prepared By:-
Mr. Pawar A. B.
13
(b)None
(a)End
(b)processing
(d)None
Q.5 Structured Programming is
(a)Dividing the program into different program modules (b)Using Structures in the program
(c)Using classes in the program
(d)None
Q.6Pseodocode is used for
(b) To make structure chart
(a)Denoting the program Flow
(c) For coding the program
(d)To write program steps
Q.7 Macro flowchart shows the
(b)Program code
(d)Both (a) & (c)
(b) Is compulsory
(c)Both
(d)None
(a)Sentinel
(b)For
(c)While
(d)Do while
Call Module A
-----------------Call Module B
-----------------Call Module C
-----------------Which of the following statements is executed after Call Module B?
(a)Call Module A
(c)The first Statement in Module B
(b)Call
Module C
(d)None
Prepared By:-
Mr. Pawar A. B.
14
Q.13 Which of the following statements is executed after all statements in ModuleB have been carried out in
above Q 12?
(a)Call Module A
(b)Call Module C
(a)The process
(c)The decision
(b)The Loop
(d)The sequential
(a)Program
(b)Flowchart
(c)Algorithm
(d)A & B
Q.22The chart that contains only function flow and no code is called as
(a)flowchart
(b)Structure chart
(c)Both A and B
(d)None
(a)Sequential
(b)decision
(c)Pseudo code
(d)Both B and C
(a)sequential
(b)decision
(c)Timesharing
(d)None
(d)None
(e)All
Q.27 In structure charts modules are described as
(a)Circle
(d)Ellipse
Mr. Pawar A. B.
15
(a)Flowchart
(b)Pseudo code
(c)Program
(d)None
(a)Pseudo code
(b)Program
(d)Algorithm
(c)Flowchart
Q.32Which of the following symbol in a flowchart are used to indicate all arithmetic processes of adding,
subtracting, multiplying and dividing ?
(a)Input/output
(b)terminal
(c)Processing
(d)Decision
Q.33 A flowchart that outlines the main segments of program is called as
(a)Micro flowchart
(b)Macro flowchart
(d)Algorithm
(c)Flowchart
(a)Micro flowchart
(b)Macro flowchart
(c)Hardware Language
(c)Flowchart
(d)Algorithm
(b)Software Language
(d)Algorithm
(a)Development
(c)Design
(b)Coding
(d)Debugging
Q.37 In which of the following pseudo code instructions are written in the order or sequence in which they
are to be performed?
(a)Selection Logic
(b)Sequence Logic
(c)Iteration Logic
(d)Looping Logic
Q.38 Which of the following logic is used to produce loops in program logic when one or more instruction
may be executed several times depending on some conditions?
(d)Decision Logic
(d)Looping Logic
Q.40 Which of the following program planning tool allows the programmers to plan program logic by writing
program instruction in an ordinary language?
(a)Flowchart
(b)Pseudo code
(c)Program
(d)Looping
Q.41Which logic is used to select the proper path out of two or more alternative paths in program logic
(a)Looping Logic
(b)Sequence Logic
(c)Iteration Logic
(d)Selection Logic
Q.42 Which of the following control structures are used in iteration logic
(a)if then if
then else
(c)do which repeat until
(b)do which
(d)do while if else
(a)Draw a flowchart
(c)Write pseudo code
(i)
(a)Connecting
(c)Processing
(e)Decision
(ii)
(iii)
(iv)
(v)
(b)Input/Output
(d)Terminal
ANS=i-(d),ii-(e),iii-(c),iv-(a);
Q.45 which of the following file conations the programmers original program code?
(a)Application file
(b)Executing
(c)Object file
(d)Source file
Prepared By:-
Mr. Pawar A. B.
16
(c)Object file
(b)Executable file
(d)Source file
(a)Connecter
(b)Decision
(c)Statement
(d)None of above
Q.51 After a programmer plans the logic of a program ,she /he will next____
(a)Understand the problem
(b)Test the program
(c)Translate the program
(d)Code the program
Q.52 What symbol is used to represent output in a flowchart?
(a)Square
(b)Circle
(c)Parallelogram
(d)Triangle
(a)Circle
(b)Parallelogram
(c)Diamond
(d)Square
Get number
While number is positive
Add to sum
(a)Sequence
(b)Decision
(d)Nested
(c)Loop
Get number
Get another number
If first number is greater than second then
Print first number
Else
print second number
(a)Sequence
(b)Decision
(c)Loop
(d)Nested
Get number
Get another number
Multiply numbers
Print result
(a)Sequence
(b)Decision
(c)Loop
(d)Nested
Q.57structured program can be easily broken down into routines or _______that can be assigned to any
number of programmers
(a)Segments
(b)Modules
(c)Units
(d)Sequences
Q.58 In a case structure of the loop, the loop body continues to execute as long as the answer to the
controlling question is yes, or true.
(a)Else
(b)Then
(c)Default
(d)Loop
Q.59 In which of the following loop ,the loop body continues to executes as long as the answer to the
controlling question is yes, or true.
(a)do-then
(b)do-when
(c)do-until
(d)do-while
Prepared By:-
Mr. Pawar A. B.
17
Q.60 Which of the following statement cause program control to end up almost anywhere in the program?
(a)go to
(b)for
(c)while
(d)do while
Q.61 Which of the following statement allows us to make a decision from the number of choices?
(a)break
(b)Switch
(c)for
(d)go to
(a)switch
(b)case
(c)for
(d)void
Q.63 Which of the following enhances the versatility of the computer to perform a set of instructions
repeatedly?
(a)Function
(b)Loop
(c)header files
(d)statement
(a)Condition
(b)statement
(c)count
(a)while
(b)switch
(d)value
(c)break
(d)continue
Q.66 Which of the following loop uses three things initialization, condition to terminate loop and increasing
the value of loop counter?
(a)for
(b)while
(c)goto
(d)switch
Q.67 The three things inside the for loop are separated by
(a)colon
(b)comma
(d)hyphen
(c)semicolon
(a)switch
(b)goto
(c)break
(d)do while
Q 69 do while loop is useful when we want that statement within the loop must be executed
(a)Only Once
(d)None of above
Q.70 Which of the following statement allows the programmer to make the control to the beginning of the
loop ,without executing the statement inside the loop?
(a)while
(b)continue
(c)go to
(d)if
(a)switch
(b)while
(d)for
(c)continue
Q.72 Which of the following statement is useful while writing menu driven programs
(a)while
(b)break
(c)switch
(d)if
Q.73 Which of the following is self contained block of statements that perform a coherent task of some kind?
(a)function
(b)loop
(c)statement
(d)body of program
Q 74 The function gets called when the function name is followed by
(a)colon
(b)semicolon
(c)statement
(c)braket
(a)Argument
(b)commands
(c)loops
(d)statements
ANSWER KEY :
QUE NO ANS QUE NO ANS QUE NO ANS QUE NO ANS QUE NO ANS
1
2
3
4
5
6
7
8
9
B
A
A
A
A
D
A
A
A
16
17
18
19
20
21
22
23
24
C
A
B
A
B
C
B
D
D
31
32
33
34
35
36
37
38
39
C
C
B
A
A
C
B
A
A
46
47
48
49
50
51
52
53
54
D
B
C
A
A
D
C
A
C
61
62
63
64
65
66
67
68
69
B
B
B
A
A
A
C
C
B
Prepared By:-
Mr. Pawar A. B.
18
D
D
C
B
A
D
25
26
27
28
29
30
B
C
B
B
D
C
40
41
42
43
44
45
B
D
C
B
55
56
57
58
59
60
B
A
B
A
D
A
70
71
72
73
74
75
B
A
A
A
B
A
Prepared By:-
Mr. Pawar A. B.
19
(b)Machine Language
(c)High-level language
(d)Binary languages
Q.2 The programming language that closely resembles the machine language is
(d)Assembly language
(a)High-level languages
(b)C language
(c)FORTRAN
Q 3 The tool used to convert a C program to machine language is called as
(a)Linker
(b)Language translator
(c)Compiler
(d)Preprocessor
(a)Object file
(b)Source file
(c)Executable
file
(d)Application file
(d)Water fall mode
(d)All of above
(a)1975
(b)1980
(c)1972
(a).obj
(b).bak
(c).c
(d)1971
(d)Sun Microsystems
(d).cpp
(a)dot(.)
(b)semi-colon(;)
(c)colon(:)
(d)Question mark(?)
(a)back space
(b)next line
(c)tab
(c)window only
(a)DOS only
(b)Linux only
Q.15 The real numbers (numbers with decimal fractional value) in C can be expressed which of the following
forms?
(a)Fractional from only
(b)ASCII
(c)Exponent form only
(d)Both fractional and Exponetial
Q.16 A character variable can store how many characters at a time?
(a) 1 character
(b)8 characters
(c)255 character
(d)None
Q.17 What will be stored in the variable ch if we write the statement char ch=z?
(a)ASCII value of Z
(b)Z along with the single inverted commas
(c)The character Z
(d)None of above
Q.18 What is the maximum value that an signed integer constant can have?
(a)32768
(b)32767
(c)1.7014e+38
(d)256
(a)A number
(b)An Alphabet
Prepared By:-
Mr. Pawar A. B.
20
(a)int=123;
(b)value= +5
(c)lime=20*T
(d)count+5=result
(a)* (asteric)
(b)_ (underscore)
(c)-(hyphen)
(d) |(pipeline)
#include<stdio.h>
void main()
{
int i=20;
printf(%d\n sizeof(i))
}
(a)2
(b)4
(c)20
(d)None of above
#include<stdio.h>
void main()
{
int a;
printf(%d\n a)
}
(a) Error
(b)0
(c)-1
(d)Garbage value
#include<stdio.h>
void main()
{
int x=10,y=20,z=5,i;
i=x<y<z;
printf(%d\n i)
}
(a)0
(b)1
(c)Error
(d)None of above
(a)int length
(b)char int
(c)int long
(d)All
Q.27If the following pair of statements are written consecutively, which of them is incorrect?
(a)short int j=255; j=j;
(b)long int k=365L; k=k;
(c)float a=3.14; a=a%3;
(d)int i=35;i=i%5;
Q.28 Which statement is correct for the comment used in C programming?
(a)Comments are used to have some explanations in the programmers source code
(b)only if a line begin with double slash, it is a comment
(c)Comment decide the sequence of operations in the program
(d)Comments must be outside the curly braces
Q 29 The preprocessor directive in C programming language begins with
(a)Hash sign(#)
(b)Backslash and asterisk(/*)
(c)Less than symbol
(d)Two back shash(//)
Q.30 Every C program should compulsorily have a function called as:
(a)start()
(b)Start()
(c)main()
(d)Main()
Mr. Pawar A. B.
21
(a)Letters
(b)Spaces
(c)Underscore
(d)Digits
(a)printname
(b)writename
(c)typename
(d)papername
(a)\f
(b)\w
(c)\\
(d)\?
(d)All of above
Q.38 For the assignment statement :a=b; Which of the following statement is true?
(a)A check is done to compare the values of a and b
(b)The value of b is assigned to variable a and any further changes in the program on variable b will also
change the value of variable a
(c) The value of b is assigned to variable a and any further changes in the program on variable b will not
change the value of variable a
(d) The value of b is assigned to variable b and any further changes in the program on variable a will not
change the value of variable b
Q.39 which of the following will not valid expressions in C?
(a) a=2+(b=5);
(c)a=11%3
(b)a=b=c=5;
(d)b+5=2
Q.40 Which of the following will not increase the value of variable c by 1?
(a) c++;
(b)c=c+1;
(c)c+1>=c;
(d)c+=1;
Q.41 When following code is executed ,what will be the values of a and b?
B=3;
A=b++;
(a)a contains 3 and b contains 4
(b)a contains 4 and b contains 4
(c)a contains 4 and b contains 3
(d)a contains 3 and b contains 3
Q.42The result of relational operator operator is always
(a)either true or false
(b)either less than or more than
(c)either equal,less or more
(d)None of above
Q.43 which of the following is not a valid relational operator?
(a)==
(b)=>
(c)>=
(d)<=
Mr. Pawar A. B.
22
(b)Monitor
(c)Disk
(d)Printer
(a)Mouse
(b)Scanner
(c)Keyboard
(d)None of above
(a)a space
(c)a new line character
(a)start()
(b)system()
(d)program
(c)main()
Q.50 What is the function from where C programs begins their execution?
(a)start()
(b)begin()
(c)main()
(d)program()
Q.51What punctuation is used to indicate the start and end of code blocks?
(a) {and}
(b)<and >
(c)[and]
(d)(and)
Q.52 Which of the following is the correct way of writing comments?
(a)*/comments/*
(b)/*comment*/
(c)**comment**
(d){comment}
Q.53 Which of the following is not a name of data type in C?
(a)double
(c)int
(b)floa
t
(d)real
(a):=
(b)==
(c)equal
(d)=
(a)&
(b)|
(c)&&
(d)||
(a)True
(b)False
(c)Error
(d)Cannot be evaluated
(c)2
(d)4
(a)1
(b)8
#include<stdio.h>
Void main()
{
char letter=
printf(\n%c letter)
}
(a)A
(b)65
(c)Error
(d)Garbage value
#include<stdio.h>
void main()
Prepared By:-
Mr. Pawar A. B.
23
Int a;
Printf(%d a^a)
}
(a)1
(b)0
(c)infinite
(d)Error
#include<stdio.h>
void main()
{
int x=0,y=0;
x=(y=75)+9;
printf(\n%d %d x y)
}
(a)75,9
(b)75,84
(c)84,75
(d)None of above
#include<stdio.h>
#define a 5+2
int main()
{
int ans;
ans=a*a*a;
printf(%d ans)
return 0;
}
(a)133
(b)343
(c)27
(d)None of above
#include<stdio.h>
int main()
{
char x=65;
x=x+10;
printf(%d x)
return 0;
}
(a)21
(b)18
(c)15
(d)None of above
(c)15
#include<stdio.h>
{
Int i=4,ans;
ans=++i+ ++i + ++i;
printf(%d ans)
return 0;
}
(a)21
(b)18
Prepared By:-
Mr. Pawar A. B.
24
#include<stdio.h>
{
Int xa=10;
printf(%d%d%d x x++ ++x)
return 0;
}
(a)11 11 11
(b)12 10 10
(c)12 11 10
(d)12 11 11
#include<stdio.h>
int main()
{
Return 0;
}
(a)2
(b)4
(c)8
(d)compiler error
#include<stdio.h>
int main()
{
int i=32,j=32,k,l,m;
k=i|j;
I= i &j;
m=k^I;
printf(%d %d %d %d %d\n = j k = m)
return 0;
}
(a)0,0,0,0,0
(b)0,32,32,32,32
(d)32,32,32,32,32
(c)32,32,32,32,0
(a)&
(b)&&
(c)||
(d)!
#include<stdio.h>
int main()
{
int k,num=30;
k=(num < 10) ? 100:200;
printf(%d%d num k)
return 0;
}
(a)200 30
(b)30 200
(c)100 200
(d)500 500
Prepared By:-
Mr. Pawar A. B.
25
#include<stdio.h>
int void()
{
int x,y,z;
x=y==z=1;
z=++x||++y &&++z;
printf(x=%d y=%d z=%d\n x y z)
return 0;
}
(a)x=2,y=1,z=1
(c)x=2,y=2,z=2
(b)x=2,y=2,z=1
(d)x=1,y=2,z=1
(c)both(a)&(b)
(d)None of above
Q.74 Which of the following special symbol is not allowed in C programming language?
(a)$
(b)-
(c)+-
(d)+
(a)void
(b)int
(c)main
(d)for
(a)main()
(b)signed
(c)integer
(a)char
(b)_int
(d)floating
(d)_float
(c)_char
(a)int_
(b)34_
(c)son_
(d)s1_
(a)#no
(b)_no
(d)&no
(c)@no
(a)number
(b)num1
(c)num_ber
(d)num ber
(a)Int
(b)INT
(d)int
(c)INt
(a)Simple_Int
(b)void
(c)#3_friends
(d)3 friends
(a)2 bytes
(b)4 bytes
(c)8 bytes
(d)1bytes
(a) 2 bytes
(b) 4 bytes
(c) 8 bytes
(d)10bytes
(a) 2 bytes
(b) 4 bytes
(c) 8 bytes
(d)10bytes
Q.86 The memory space taken for a long double type data is
(a) 2 bytes
(b) 4 bytes
(c) 8 bytes
(d)10bytes
Q.87 The memory space taken for a long int type data is
Prepared By:-
Mr. Pawar A. B.
26
(b) 4 bytes
(c) 8 bytes
(d)10bytes
Q.88 The memory space taken for a signed char type data is
(a) 2 bytes
(b) 4 bytes
(c) 8 bytes
(d)10bytes
(a)\n
(b)\b
(c)\c
(d)\a
(a)\d
(b)\e
(c)\f
(d)\g
(a)\\
(b)\?
(c)\
(d)\;
(a)\:
(b)\+
(c)\
(d)\;
(a)2 bytes
(b)4 bytes
(c)8 bytes
(d)1 Byte
(a)2 bytes
(b)4 bytes
(c)8 bytes
(d)10 bytes
i) \n
ii) \t
iii) \b
iv) \a
(a)i-A,ii-B,iii-C,iv-D
(c)i-D,ii-B,iii-C,iv-A
(a)back space
(b) tab
(c)beep sound
(d) new line
(b)i-D,ii-B,iii-A,iv-C
(d)i-D,ii-C,iii-B,iv-A
i) \v
ii) \t
iii) \b
iv) \r
(a)i-A,ii-B,iii-C,iv-D
(c)i-D,ii-B,iii-C,iv-A
(a)carriage return
(b) back space
(c) horizontal tab
Int i=9,j=6;
Float x=0.5,y=0.5;
Char a=a b=b
(3*i-2*j)%(2*a-b)
(a)10
(b)15
(c) 11
(d)16
Int i=9,j=6;
Float x=0.5,y=0.5;
Char a=a b=b
(a)7
(b)15
(c) 14
(d)16
Prepared By:-
Mr. Pawar A. B.
27
Int i=9,j=6;
Float x=0.5,y=0.5;
Char a=a b=b
(a)-1
(b)0
(c) 1
(d)2
Int i=9,j=6;
Float x=0.5,y=0.5;
Char a=a b=b
(a)-1
(b)0
(c) 1
(d)2
Int i=9,j=6;
Float x=0.5,y=0.5;
Char a=a b=b
A==99
(a)-1
(b)0
(c) 1
(d)2
Int i=9,j=6;
Float x=0.5,y=0.5;
Char a=a b=b
++i
(a)10
(b)11
(c) 9
(d)8
Int i=9,j=6;
Float x=0.5,y=0.5;
Char a=a b=b
i++
(a)10
(b)11
(c) 9
(d)8
Int i=9,j=6;
Float x=0.5,y=0.5;
Char a=a b=b
!(b==98)
(a)0
(b)1
(c)- 1
(d)98
#include<stdio.h>
Prepared By:-
Mr. Pawar A. B.
28
Void main()
{
int a=2,b=3,ab=4;
int i;
int in=2*2
char ch=c
(a)dd
333
(b)c d
223
334
445
30
(d) None of the above
444
555
31
(c)d c
322
433
544
31
Q.106 Find the output of the following program.
#include<stdio.h>
Void main()
{
int x=4,y=9;
int z;
z=(x++)+(--y)+y;
printf(Value=%d\n z)
}
(a)value=22
Value=17
(c)value=22
Value=18
(b)value=19
value=16
(d)value=20
value=16
#include<stdio.h>
Void main()
{
int a,b,c;
a=2;b=5;c=10;
printf(value=%d\n (a+b*-c));
printf(value=%d\n (-c/b*c-a));
printf(value=%d\n (-a+ ++b %a));
}
(a)value=-70
Value=-18
Value=0
(b)value=-48
value=-22
value=0
Prepared By:-
Mr. Pawar A. B.
29
(d)value=20
value=16
value=-2
#include<stdio.h>
Void main()
{
int a=5,b=3;
float c;
c=a/b;
printf(%d\n c)
}
(a)0
(b)1
(c)-1
#include<stdio.h>
Void main()
{
clrscr();
int a=10,b,c;
c=b=a;
b-=a--;
c-=--a;
a-=--a;
a-=--a-a--;
printf(a=%d\nb=%d\nc=%d\n a b c)
}
Output:
(a)a=7
b=1
c=3
(c)a=6
b=6
c=2
(b)a=5
b=-1
c=1
(d)None of the above
#include<stdio.d>
Void main()
{
int k=3,I=4,m;
m=++k +I--;
printf(Value of m %d\n m)
m=k++ + --I;
printf(Value of m %d\n m)
}
(a)Value of m 7
Value of m 6
(c)value of m 7
(b)Value of m 8
value of m 6
Mr. Pawar A. B.
30
Value of m 6
Q.112 Find the output of the following program.
#include<stdio.h>
Void main()
{
int a=1,b=2,c=3,d=4.75,x;
(a)2 3 4 5 2
(c) 1 2 3 4 2
(b) 2 3 4 1
(d) 1 2 3 4 5
#include<stdio.h>
Void main()
{
int x=1;
printf(%d%d%d\n x (x=x+2) (x 2))
x<<2;
printf(%d%d%d\n ++x x++ ++x)
}
(b)433
(a)334
644
446
(c)343
464
#include<stdio.h>
Void main()
{
char letter=
printf(\n%d letter)
}
(b)68
(c)Error
(d)Garbage value
#include<stdio.h>
#include<conio.h>
void main()
{
int i=4,z=12;
clrscr();
if(i=5 || z>50)
printf("\n Samosa");
else
printf("\n Dosa");
getch();
}
Prepared By:-
Mr. Pawar A. B.
31
Samosa
b)Dosa
c) Error
d) None of above
#include<stdio.h>
#include<conio.h>
void main()
{
int i=4,z=12;
clrscr();
if(i=5 && z>50)
printf("\n Let us C");
else
printf("\n Let us Not C");
getch();
}
a)
Let us C
d) None of above
#include<stdio.h>
#include<conio.h>
void main()
{
int p=8,q=20;
if(p==5 && q>5)
printf("\n Why not C");
else
printf("\n Why C");
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int j=4,k;
k=!5 &&j;
printf("\n k= %d",k);
}
a) 4
b)5
c)0
d)45
#include<stdio.h>
Prepared By:-
Mr. Pawar A. B.
32
#include<conio.h>
void main()
{
int i=0;
clrscr();
for(;i<=2;)
printf("%d",++i);
getch();
}
a) 1 2 3
b)0 1 2
c) 2 3 4
d) error
#include<stdio.h>
#include<conio.h>
void main()
{
int i=4;
clrscr();
printf("%d\t%d\t%d\t",i,i--,--i);
getch();
}
a) 2 3 3
b) 4 3 2
c) 2 2 2
d) 3 3 3
#include<stdio.h>
#include<conio.h>
void main()
{
int i=4;
clrscr();
printf("%d",i);
printf("\n%d",i--);
printf("\n%d",--i);
getch();
}
a) 4 4 2
b) 4 4 3
c) 4 4 4
d) 4 3 2
#include<stdio.h>
#include<conio.h>
void main()
{
int i=4;
clrscr();
printf("%d\t%d\t%d\t",i,i++,++i);
getch();
Prepared By:-
Mr. Pawar A. B.
33
b) 6
c) 6
d) 5
#include<stdio.h>
#include<conio.h>
void main()
{
int x=5,y;
y=x++;
printf("%d%d",x,y);
getch();
}
a) 6 5
b)5 6
c) 6 6
d) 5 5
#include<stdio.h>
#include<conio.h>
void main()
{
int x=5;
if(i=0)
{
Printf( = am in Zero)
}
Else
{
Printf( = am in :ero)
}
getch();
}
a) I am in Hero
#include<stdio.h>
#include<conio.h>
void main()
{
int i;
for(i=32200;i<=32768;i++)
{
c) Error
d) None of above
Prepared By:-
Mr. Pawar A. B.
34
Answer Key :
Que No Ans Que No Ans Que No Ans
1
2
3
4
5
6
7
8
9
A
D
C
B
A
C
A
A
C
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
C
B
A
D
D
A
B
B
A
D
B
B
A
D
C
A
C
A
A
C
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
B
B
C
A
B
C
D
C
D
C
A
A
B
B
C
D
B
A
C
C
A
B
D
B
C
A
D
A
B
B
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
C
B
A
D
D
C
C
A
B
B
B
B
B
C
C
B
A
B
B
D
D
B
D
A
B
D
B
D
C
C
Que No
Ans
Que No
Ans
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
D
C
D
A
B
D
B
C
C
C
B
A
C
A
A
C
D
D
B
C
B
A
A
A
A
A
B
A
A
A
121
122
123
124
A
A
A
A
Prepared By:-
Mr. Pawar A. B.
35
Loops in C
Q.1 What is the final value of x when the code int x; for(x=0;x<=10;x++){} is run ?
(a)10
(b)9
(c)0
(d)11
(a)repeat until
(b)do while
(c)while
(d)for
Q.4 Which of the following loops will definitely execute atleast once even if the condition is not satisfied
(a)for
(b)while
(c)do-while
If(z=100)
Printf(z is 100)
(a)100 should be written in double quotations in the first line
(b)variable z should be inside double quotations in the first line
(c)Mistakes in the equals to operator
(d)There is no semicolon (;) at the end of first line
Q.6 Looping in a program means
(a)Branching to be specified branch or label in the program
(b)repeating a given set of instruction
(c)Both of above
(d)None of above
Q.7 The difference between while and do-while statements is
(a)In the while statement the control first enters into the loop then condition is tested at the end of first
iteration
(b)In do while the condition is tested in first iteration and if the condition is true ,it enters into the loop
(c)The do-while statements condition is used to decide whether to enter the loop or not whereas the while
statements condition is used to decide whether to exit the loop or not
(d)The while statements condition is used to decide whether to enter the loop or not whereas the do-while
statements condition is used decide whether to exit the loop or not
Q.8Which of the following is not a branching statement in C?
(a)exit
(b)break
(c)goto
(d)switch
(a)if-else
(b)switch-case
(c)both a&b
(d)do-while
(a)for
(b)switch-case
(c)while
(d)do-while
Prepared By:-
Mr. Pawar A. B.
36
Switch(x)
{
Case 1 printf(x is 1)
Break;
Case 2:
Case 3 printf(x is 3)
break;
default:
printf(X is not within the range)
}
(a)Program jumps to the end of switch statement since there is nothing to do for x=2
(b)The code inside default will run since there is no task for x=2,so
(c)Will display x is 3,and then come outside the switch statement
(d)None of above
Q 13 Which of the following is false for a switch statement in C?
(a)break statement is false is compulsory after each case
(b)default statement is compulsory
(c)There is a limit on the maximum number of cases
#include<stdio.h>
Void main()
{
Int s=0;
While(s++<10)
{
Continue;
Printf(\n%d\t s)
}
}
(a)1 2 3 4 5 6 7 8 9
(c)4 5 6 7 8 9 10
(b)1 2 3 10
(d)4 5 6 7 8 9
#include<stdio.h>
Void main()
{
int a=2;
if(a==2)
{
Prepared By:-
Mr. Pawar A. B.
37
a=a+2;
printf(%d a)
}
Else
{
Break;
}
}
(b)-3
(c)4
(d)Compile error
#include<stdio.h>
#include<string.h>
void main()
{
int i=0;
for(;i<=2;)
printf(%d ++i)
}
(a)0 1 2
(b)1 2 3
(c)0 1 2 3
(d)Infinite loop
#include<stdio.h>
void main()
{
Int x;
For(x=1;x<=5;x++)
printf(%d x)
}
(a)1 2 3 4 5 6
(b)6
(c)1 2 3 4 5
(d)5
#include<stdio.h>
Void main()
{
Int x;
for(x=0;x<=10;x++)
{
If(x<5)
Continue;
Else
break;
printf(C)
}
}
(a) 5 times
(b)11 times
(c)0 times
(d)10 times
Prepared By:-
Mr. Pawar A. B.
38
#include<stdio.h>
void main()
{
int j=1;
while(j<=255)
{
printf(%d\n j)
}
j++;
}
}
(a)0 times
(b)254 times
(c)255 times
(d)256 times
#include<stdio.h>
void main()
{
int i=0;
for(;i<=5;i++);
printf(%d i)
}
(a)0,1,2,3,4,5
(c)1,2,3,4
(b) 5
(d) 6
#include<stdio.h>
void main()
{
int x=500,y=100,z;
if(!x>=400)
y=300;
z=200;
printf(y=%d z=%d\n y z)
}
(a)y=100 z=200
(c)y=100 z=garbage
#include<stdio.h>
void main()
{
int x=4;
float y=4.0;
if(x==y)
printf(x and y are equal)
else
printf(x and y are not equal)
}
Mr. Pawar A. B.
39
(d) No output
#include<stdio.h>
void main()
{
float a=0.7;
if(a==0.7)
printf(:i)
else
printf(:ello)
}
(a)Hi
(b) Hello
(d) None of above
(c)Hi Hello
#include<stdio.h>
void main()
{
int i=5;
while(i-- >=0)
printf(%d i)
printf(\n)
while(i-- >=0)
printf(%i i)
i=5;
printf(\n)
while(i-- >=0)
printf(%d i)
return 0;
}
(a)4,3,2,1,0,-1
(b)5,4,3,2,1,0
4,3,2,1,0,-1
5,4,3,2,1,0
(c)Error
(d) 5,4,3,2,1,0 5,4,3,2,1,0 5,4,3,2,1,0
Q.25 find the output of the following program
#include<stdio.h>
void main()
{
int i=1;
switch(i)
{
printf(:ello\n)
case 1:
printf(:i\n)
case 2:
printf(\nBye\n)
break;
Prepared By:-
Mr. Pawar A. B.
40
}
}
(a)Hi
(b)Bye
(d) Hello Bye
(c)Hello Hi
#include<stdio.h>
void main()
{
char j=1;
while(j<5)
{
printf(%d j++)
}
printf(\n)
}
(a)1 2 3 4 127
(c)1 2 3 4 5 127 128 0 1 2 3 infinite times
(b) 1 2 3 4 255
(d) 1 2 3 4
Q.27 To repeat a set of the statements for 25 times ,which kind of statement will be required?
(a)Iterative
(b)Selective
(d)None of the above
Q.28 To perform one of the many operations selected based on a condition, which kind of statement will be
required?
(a)Iterative
(b)Selective
(d)None of the above
(a)true
(d)None of the above
(b)False
(a)1
(b)2
(c)3
(d)None of above
(a)0
(b)1
(c)2
(d)None of above
(a)1
(b)2
(c)3
(d)None of above
(a)0
(b)1
(c)2
(d)None of above
(a)1
(b)2
(c)3
(d)None of above
Mr. Pawar A. B.
41
(b)2
(c)3
(d)None of above
Q.36 The for loop execution has statements inside the loop executed before checking the condition for the
first time
(a)True
(b)False
(c)Depends on the condition
(d)None of the above
Q 37 The while loop can be replaced by for loop in all the cases
(a)True
(b)False
(c)Depends on the condition
(a)True
(b)False
(a)True
(b)False
Q.42 There is no semicolon (;) after the condition in the syntax of the while loop
(a)True
(b)False
(c)Depends on the condition
(d)None of the above
Q 43 There is no semicolon ( ) after the condition in the syntax of the do-while loop
(a)True
(b)False
(c)Depends on the condition
(d)None of the above
Q.44 In the if-else statement else is optional
(a)True
(b)False
Q.45 There can be a condition in the brackets associated with the switch statement
(a)True
(b)False
(c)Depends on the condition
(d)None of the above
Q.46 Only expression or a variable is allowed in the brackets associated with the switch statement
(a)True
(b)False
(c)Depends on the condition
(d)None of the above
Q 47 break statement is compulsory after every case in the switch-case statement
(a)True
(b)False
(c)Depends on the condition
(d)None of the above
Q 48 default statement is compulsory after every case in the switch-case statement
(a)True
(b)False
(c)Depends on the condition
(d)None of the above
Q.49 The label in switch-case statement can be a condition or expression
(a)True
(b)False
(c)Depends on the condition
Mr. Pawar A. B.
42
(a)Outside the loop ,to the next statement after the loop
(b)beginning of the loop i.e. to the first statement in the loop
(c)outside the function, to the next function in the program
(d)beginning of the function i.e. to the first statement in the function
Q 52 continue statement when executed the control is transferred___________
(a)Outside the loop ,to the next statement after the loop
(b)beginning of the loop i.e. to the first statement in the loop
(c)outside the function, to the next function in the program
(d)beginning of the function i.e. to the first statement in the function
Q 53 goto statement transfers the control to___________
(a)Outside the loop ,to the next statement after the loop
(b)beginning of the loop i.e. to the first statement in the loop
(c)Label specified with the statement
#include<stdio.h>
void main()
{
int i,j;
for(i=1;i<=2;i++)
{
for(j=1;j<=2;j++)
{
printf(:ello)
}
printf(:i\n)
}
}
(a)Hello Hello Hi
Hello Hello Hi
(d)Hello Hi
Hello Hi
Hello Hi
Hello Hi
#include<stdio.h>
void main()
{
int i,j;
for(i=1;i<=2;i++)
{
for(j=1;j<=3;j++)
{
Prepared By:-
Mr. Pawar A. B.
43
printf(:ello)
}
printf(\n)
}
}
(d)Hello Hello
Hello Hello Hello
#include<stdio.h>
void main()
{
int i,j;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf(1)
}
printf(\n)
}
}
(a)
1
11
111
1111
111111
(b) 1
1
1
1
1
(b)11111
(c)
11111
1111
111
11
1
#include<stdio.h>
void main()
{
int i,j;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf(*)
}
printf(\n)
}
Prepared By:-
Mr. Pawar A. B.
44
(a)*
(c)*
(b)*****
(d)*****
**
***
****
*****
****
***
**
*
#include<stdio.h>
void main()
{
int n=400;
if(n%10==0)
{
printf(Yes)
}
else
{
printf(No)
}
}
(a)Yes
(c)Compilation Error
(b)No
(d)None of the above
#include<stdio.h>
void main()
{
int i=1,j=1;
for(;;)
{
if(i>3) break;
else j+=i;
printf(%d\n j)
i+=j;
}
}
(a)Compile error
(b)2
5
(c)2
(d)2
3
#include<stdio.h>
void main()
{
int i;
for(i=0;i<=8;i++)
Prepared By:-
Mr. Pawar A. B.
45
if(i%2==0)
printf(%d\n i+1)
else if(i%3==0)
continue;
else if(i%5==0)
break;
printf(\nEnd of the program\n)
}
printf(\nEnd of program\n)
}
(a) 1
End of program
End of program
3
End of program
5
End of program
End of program
(b) 1
End of program
2
End of program
3
End of program
4
End of program
5
End of program
(c)Error
(a) I=10
do
{
do something
}while(I<10);
(b)do something will not be executed at all
(c)do-while loop is not a valid loop.
void main()
{
int i=1,j=2,k=3;
if(i==1)
if(j==2)
if(k==3)
Prepared By:-
Mr. Pawar A. B.
46
printf(ok)
break;
}
else
printf(continue)
printf(bye)
}
(a)ok
(c)Misplaced break
(b)okbye
(d)None of there
void main()
{
int I,j=6;
for(;i=j;j-=2)
printf(%d j)
}
(a)Error
(c)642
(b)Garbage value
(d)6420
Q 64 Select the correct statement if n is the number of times the loop is executed
(a)In a while loop the control conditional check is performed n times.
(b)In a do-while loop the control conditional check is performed n+1 times.
(c)Break is a keyboard used with if and switch case.
(d)None of these
Q.65 Find output
void main()
{
Float x=2.8,y=4;
if(x%=y)
printf(Both are equal)
else
printf(Not equal)
}
(b)Not equal
(d)None of these
void main()
{
int a=2,b=0,c=-2;
if(b,a,c)
printf(True)
else
printf(False)
}
(a)True
(b)False
Prepared By:-
Mr. Pawar A. B.
47
(a)DO loop
(c)SWITCH statement
(b)FOR loop
(d)all of above
Q.68 In which statements, does a CONTINUE statement cause the control to go directly to the test condition
and then continue the looping process?
#include<stdio.h>
void main()
{
int I;
for(i=0;i<10;i++)
printf(%d i)
}
(b)Compile Error
(c)9
(a)0 1 2 3 4 5 6 7 8 9
#include<stdio.h>
void main()
{
int i=2,j=2;
while(i+1?i:j++)
printf(%d j)
}
(a)1
(b)2
(c)3
(d)4
#include<stdio.h>
void main()
{
int x=011,i;
for(i=0;i<x;i+=3)
{
printf(Error)
continue;
printf(Exit)
}
}
(a)EnterExitEnterExitEnterExit
(c)EnterEnterEnterExit
(b)EnterEnterEnter
(d)None of the above
#include<stdio.h>
Prepared By:-
Mr. Pawar A. B.
48
void main()
{
int i,j;
i=j=2;
while(--i&&j++)
printf(%d%d = j)
}
(a)1 30 4
(b)1 3
(c)Error
#include<stdio.h>
void main()
{
int x=1;
for(;x<5;x++)
printf(%d ++x)
}
(a)1234
(b)123456
(c)135
(d)24
ANSWER KEY
Que No Ans
1
D
2
3
4
5
6
7
8
9
A
C
C
B
D
A
C
10
11
12
13
14
15
C
C
C
B
D
Que No
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Ans
A
B
B
B
A
A
B
C
A
B
A
C
A
B
A
Que No
61
62
63
64
65
66
67
68
69
70
71
72
73
Prepared By:-
Ans
A
C
C
D
C
A
D
A
D
B
B
B
D
Mr. Pawar A. B.
49
#include<stdio.h>
int X=40;
void main()
{
int X=20;
printf(%d\n X)
}
(a)20
(b)40
(c)60
(d)Error
#include<stdio.h>
void main()
{
int fun(float);
int a;
a=fun(3.14);
printf(%d\n a)
}
return(int)++aa;
}
(a)3
(b)4
(c)0
(d)Error
#include<stdio.h>
void main()
{
int a[5]={2,3};
printf(%d%d%d\n a*2+ a*2+ a*4+)
}
(b)2,3,3
(a)Garbage Values
(c)3,2,2
(d)0,0,0
#include<stdio.h>
void main()
{
diplay();
}
void display()
{
printf(=ndiaB=X)
}
(a)No Error
Mr. Pawar A. B.
50
(a)True
(b)False
Q.6 A function can be overloaded with a return type if it has all the parameters same.
(a)True
(b)False
(a)True
(b)False
(a)long
(b)double
(c)void
(d)int
(a)comma(,)
(c)colon(;)
(b)semicolon(;)
(d)None of above
Q.11 Variables declared inside the parenthesis of a function have ______ visibility.
(a)Local
(b)Global
(c)Module
(d)Universal
Q.12 According the following declaration of a function, which of the statement given below is true
true int function(int a,int b=2)
(a)Variable b is of integer type and will always have value 2
(b)Variable a and b are of int type and the initial value of both variables is 2
(c)Variable b is global scope and will have value 2
(d)Variable b will have value 2 if not specified when calling function
Q.13 String is an array of character arrays terminated with__________
(a)\n
(b)\t
(c)\0
(d)\1
Q.14 The void specifier is used if a function does not have return type.
(a)True
(b)false
Q.15 According to the following statements, select the best suitable statement
int x=5,y=3,z;
a=add(x,y)
(a)The function add is called by passing the values
(b) The function add is called by passing reference
(c) Both (a and b) of above
(d)None of above
Q.16 According to the following code, select the best suitable statement
int x=5,y=3,z;
a=add(&x,&y)
Prepared By:-
Mr. Pawar A. B.
51
(d)None of above
Q.17 In case of arguments passed by values when calling a function such as z=add(x,y)
(a) ny modifications to the variables x and y from inside the function add will not have any effect
on the variables outside the function.
(b)The variables x y will be updated when any modification is done in the function add
(c)Yhe variable x y will be modified as per modification in the function add but the Variable y will not be
updated as per the variation in the function add
(a)pass by value
(c)pass by variables
(b)pass by reference
(d)none of above
processing
(c)Both of above
(d)None of above
Q.20 When an array is passed to a function, it can said that______ is passed
(a)Address of the array
(b)Value of the first element of the array
(c)Address of the first element of the array
(d)Number if elements in the array
Q.21 Find the output of the following program?
#include<stdio.h>
void main()
{
(a)Hello world
(c)Garbage value
(b)Error
(d)None of the above
#include<stdio.h>
void main()
{
int array[]={10,20,30,40};
printf(%d -2[array);
}
(a)-60
(b)-30
Prepared By:-
Mr. Pawar A. B.
52
(d)compile error
#include<stdio.h>
void main()
{
int i=10;
static int x=10;
if(x==i)
printf(Equal)
else
printf(Less than)
}
(a)Equal
(c)Less than
(b)Greater than
(d)None of the above
#include<stdio.h>
void main()
{
char str*+=C-program
int a=5;
printf(a 10?Ps\n %s\n str)
}
(a)C-program
(c)Error
(b)Ps
(d)None of the above
(a)True
(b)False
(a)void
(c)int
(b)main
(d)float
(a)1
(c)3
(b)2
(d)None of the above
Q.28 The function with the name ___________ is always written in every program
(a)int
(c)main
(b)void
(d)factorial
(a)1
(c)3
(b)2
(d)None of the above
Q.30 In the function definition, the argument list must always be accompanied with the corresponding
data type
Prepared By:-
Mr. Pawar A. B.
53
(b)False
(a)True
(b)False
(a)int
(c)float
(b)void
(d)recursive
Q.35 Argument list is a list of parameters that the __________ has to pass to the function
(a)main function
(b)Operating System
(c)caller function
(d)called function
Q.36 The parameters passed by the caller function are called as the ___________ parameters
(a)actual
(c)informal
(b)formal
(d)reference
Q.37 The parameters received by the called function are called as the ___________ parameters
(a)actual
(c)informal
(b)formal
(d)reference
Mr. Pawar A. B.
54
function
(a)true
(b)false
Q.43 The prototype of a function should contain the variable names of the parameters to be passed to that
function
(a)true
(b)false
Q.44 The data types mentioned in the prototype of a function are to be separated by
(a),(comma)
(c):(colon)
(b).(dot)
(d);(semi-colon)
Q.45 The true of the actual and formal parameters must be same
(a)True
(b)false
Q.46 A variable required to accept the parameter returned by a function must be assigned the function to in
(a)True
(b)False
Q.47 The return datatype of the function and that of the variable accepting the returned value can be
different
(a)True
(b)False
(a)True
(b)False
(a)True
(b)False
Q.50 The prototype declaration can be written without writing the identifiers of the arguments
(a)True
(b)False
Q.51 To call a function we need to simply write the name of the function followed by the parameters to be
passed in the brackets
(a)True
(b)False
Q.52 The variable used to accept the returned value from the called function must be written on the left of
the function call statement separated by an ampersand (&) sign
(a)True
(b)False
Q.53 The prototype declaration of a function can be the same as the header line of the function calling itself
again and again
(a)True
(b)False
Q.54 A recursive function may or may not have a condition such that there is an exit from the function calling
itself again
(a)True
(b)False
Prepared By:-
Mr. Pawar A. B.
55
Q.55 The actual and formal parameters are the same variables with statement names
(a)True
(b)False
(a)calls itself
(b)replaces the function call with the function definition
(c)has no return type
(a)True
(b)False
(a)True
(b)False
(a)True
(b)False
(a)0
(c)2
(b)1
(d)none
Q.65 The index of the last element of an array of n elements will be______
(a)n+1
(c)n-1
(b)n
(d)none of the above
Q.66 The size of an array can be changed during the execution of the program
Prepared By:-
Mr. Pawar A. B.
56
(b)False
Q.67 The size of an static and cannot be initialized during the execution of the program
(a)True
(b)False
int a[10];
will be_____bytes
(a)10
(c)30
(b)20
(d)40
float a[10];
will be_____bytes
(a)10
(c)30
(b)20
(d)40
(a),(comma)
(c)&(ampersand)
(b);(semi-colon)
(d)[] (square brackets)
(a)a[10]
(c)a[9]
(b)a[11]
(d)a[8]
(a)1
(c)3
(b)2
(d)None of the above
Prepared By:-
Mr. Pawar A. B.
57
(a)pointer
(c)structure
(b)string
(d)none of the above
Q.76 The ASCII value of the null character stored at the end of the string is__________
(a)65
(c)0
(b)97
(d)none of the above
Q.77 The memory space required to store the string =ND= is ___________ bytes
(a)5
(b)6
(c)0
(d)infinity
Q.78 Which of the following is a correct method of declaration for a string of 100 characters
(a)char a[100];
(b)char a[99];
(a)getchar()
(b) putchar()
(b)gets()
(d) puts
Q 80 string accepted from user is automatically terminated with null character (\0)
(a)True
(b)False
Q.81 The header file that has various string
(a)string
(b)float
(c)int
(d)void
(a)string
(b)float
(c)int
(d)void
Q.83 The strlen() function will return________ for the string with the value =ND=
(a)4
(b)5
(c)6
(a)zero(0)
(b)garbage
(c)1
(a)memory
(b)CPU registers
(c)nowhere
(d)compile
(b)global
(c)in multiple programs
Prepared By:-
Mr. Pawar A. B.
58
(a)zero(0)
(b)garbage
(c)1
(a)memory
(b)CPU registers
(c)nowhere
(d)compiler
(a)1
(b)2
(c)3
(a)zero(0)
(b)garbage
(c)1
(a)memory
(b)CPU registers
(c)nowhere
(d)compile
(a)zero(0)
(b)garbage
(c)1
(a)memory
(b)CPU registers
(c)nowhere
(d)compile
Mr. Pawar A. B.
59
#include<stdio.h>
int x;
void f1()
{
++x;
}
void main()
{
int x=10;
f1();
x=::x+10;
printf(%d%d\n x x)
}
(a):
11
(c) 1
11
(b)1 1
(d)None of the above
#include<stdio.h>
void f1()
{
int n2=20;
n1=n1+10;
n2=n1+n2;
n3=n1+n2;
printf(%d%d%d\n n1 n2 n3)
}
int n3;
void main()
{
register int I;
for(i=1;i<=3;i++)f1();
}
(a)10 10 10
20 20 20
30 30 30
(b)10 30 40
10 30 40
10 30 40
Prepared By:-
Mr. Pawar A. B.
60
(c)10 30 40
20 40 60
30 50 80
Que No
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Ans
A
D
A
C
A
B
B
D
C
A
A
D
C
A
A
B
A
B
B
C
A
B
A
A
A
B
A
C
D
A
Que No
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Ans
A
A
C
B
C
A
B
C
C
C
C
A
B
A
A
A
B
A
B
A
A
B
A
B
B
D
B
B
A
B
Que No
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Ans
B
B
A
A
C
B
A
C
B
D
D
C
Que No
91
92
93
94
95
96
97
98
99
100
101
102
Ans
B
C
A
A
A
A
A
A
C
A
A
C
D
C
B
C
B
A
C
A
C
C
B
B
A
A
B
B
B
A
Prepared By:-
Mr. Pawar A. B.
61
#include<stdio.h>
void main()
{
int i=3,*p,**p1;
p=&i;
p1=&p;
printf(%d%d%d *p **p1 *(*p1))
}
(a)444
(b)000
(c)333
(d)433
Q.2 which of the following is the correct way of declaring a float pointer:
(a)float ptr;
(c)*float ptr;
(b)float *ptr;
(d)None of the above
Q.4 An entire structure or union variable can be assigned to another structure or union variable if
(a)The two variables have same composition
(b)the two variable have same type
(c)Assignment of one structure or union variable to another is not possible
#include<stdio.h>
void main()
{
int i=32;
char *ptr=(char*)&i;
printf(%d *ptr)
}
(a)1
(b)32
(c)compile error
struct author
{
int age;
struct inner
{
char name[20];
};
};
Mr. Pawar A. B.
62
(d)There is no
error
#include<stdio.h>
void main()
{
int array[]={10,20,30,40};
printf(%d 2*array+)
}
(a)60
(b)30
(c)garbage value
(d)compile error
#include<stdio.h>
void main()
{
(a)12
(b)8
(c)4
(d)compile error
I:
struct book
{
char name[10];
int pages;
};
II:
long int x=2.35;
III:
enum day{Sun,Mon,Tue,Wed};
(a)I
(b)II
(c)III
(d)Both I and II
(c) error
#include<stdio.h>
void main()
{
struct employee
{
char name;
int age;
float sal;
};
(a)0, 0.000000
(b)Garbage value
Prepared By:-
Mr. Pawar A. B.
63
#include<stdio.h>
struct emp
{
char name[20];
int age;
};
void main()
{
(a)Error:in printf
(c)No error
char name[10];
inr pages;
};
2: struct aa
{
char name[10];
int pages;
}
3: struct aa
{
char name[10];
int pages;
}
(a)1
(b)2
(c)3
(d)all of above
#include<stdio.h>
void main()
{
union var
{
int a,b;
};
union var v;
Prepared By:-
Mr. Pawar A. B.
64
v.a=60;
v.b=70;
printf(%d\n v a)
}
(a)60
(b)70
(c)30
(d)0
#include<stdio.h>
struct course
{
int courseno;
char coursename[25];
};
void main()
{
(a)3 Physics
(b)2 Maths
(d)2 Physics
(c)1FPL
(a)value
(b)address
(d)None of above
ANS=(b)
Q 17 To declare a pointer for an int type variable which if the following is correct statement
(a)int *p;
(b)*int p;
(c)float *p;
(d)*float p;
(a)True
(b)False
(a)address
(b)value
(c)product
(d)none of above
(a)address
(b)value
(c)product
(d)none of above
(a)True
(b)False
#include<stdio.h>
void main()
{
int a,p*;
a=125;
p=&a;
Prepared By:-
Mr. Pawar A. B.
65
printf(%d\n a)
printf(%x\n p)
printf(%d\n *p)
}
(a)125
(b)125
Address of variable a
Address of variable b
Address of variable a
125
(c)125
125
125
Q.23 Find output of the following program
#include<stdio.h>
void main()
{
int a,p*,**p1;
a=125;
p=&a;
p1=&p;
printf(%d\n a)
printf(%x\n p)
printf(%x\n p1)
printf(%d\n *p)
printf(%x\n *p1)
printf(%d\n **p1)
}
(a)125
125
125
125
125
125
(c)125
(b)125
Address of variable a
Address of pointer variable p
125
Address of variable a
125
(d)125
Address of variable a
Address of variable a
125
Address of variable a
125
Q.24 Find the output of the following program
#include<stdio.h>
void main()
{
int a,*a1;
float b,*b1;
a1=&a;
b1=&b;
printf(%x\n%x\n a1 b1)
a1++;
Prepared By:-
Mr. Pawar A. B.
66
b1++;
printf(%x\n%x\n a1 b1)
}
(a)value of variable a
value of variable b
#include<stdio.h>
void main()
{
clrscr();
int i,a[2]={10,20};
for(i=0;i<=1;i++)
{
printf(%d\n a*i+)
printf(%d\n *(a+1))
printf(%d\n *(i+a))
}
}
(a)10
10
10
20
20
20
(b)10
(c)10
(d)20
10
10
10
10
10
20
10
20
10
20
20
20
20
20
20
Q.26 Read the statements given bellow and select the correct statement
int a,*p,**p1;
p=&a;
p1=%p;
(a)p1 is a pointer to pointer p
Mr. Pawar A. B.
67
(b)2
(c)4
(d)8
(a)1
(b)2
(d)8
(c)4
(a)True
(b)False
(b)False
Q.31When the value of variable is passed to the function ,the function can access the actual parameters
(a)True
(b)False
Q.32When the address of variable is passed to the function ,the function can access the actual parameters
(a)True
(b)False
Q 33 =n Pass by value method of passing parameters to a function the called function ________
(a) can alter the actual parameter
(b)cannot alter the actual parameter
(c) can only partially alter the actual parameter
(a)true
(b)false
Q.36 The total memory space allocated for a variable of a structure is equal to_______
(a)Memory space required by the largest member variable of the structure
(b)sum of memory space required by the all member variable of the structure
(c)100 bytes
(d)none of the above
Q.37 The total memory space allocated for a variable of a union is equal to_______
(a)Memory space required by the largest member variable of the structure
(b)sum of memory space required by the all member variable of the structure
(c)100 bytes
(d)none of the above
Q.38 Which of the following operator is used to select a member of a structure variable
(a).(dot)
(b),(comma)
(d);(semicolon)
(c): (colon)
Prepared By:-
Mr. Pawar A. B.
68
Q.39 A structure inside another structure can be declared and is called as nested structure
(a)True
(b)False
(a)True
(b)False
int *p,i[3];
i[0]=0;i[1]=1;i[2]=2;
P=&i[1];
what is the value of expression *P++?
(a)0
(c)2
(b)1
(d)undefined
ANSWER KEY
Que No
1
2
3
4
5
6
7
8
9
10
Ans
C
B
C
B
B
C
B
A
B
Que No
11
12
13
14
15
16
17
18
19
20
Ans
B
D
B
B
D
B
A
A
B
Que No
21
22
23
24
25
26
27
28
29
30
Ans
A
B
B
D
A
C
C
B
A
A
Que No
31
32
33
34
35
36
37
38
39
40
Ans
B
A
Que No
41
Ans
B
A
B
B
A
A
A
A
1.
a.
b.
c.
What is an IDE?
Internet Debugging Editor
Integrated Development Environment
2.
a.
b.
c.
3.
a.
b.
c.
Which of these commands would give you access to the printf function:-
Interdependent element
Compilation
Linking
include stdio.h;
#include <stdio.h>
#include conio.h;
Mr. Pawar A. B.
69
int myconst = 5;
#define MYCONST 5
1. 1
2. 7
3. 9
11. Which of the following would read a decimal number into a float variable 'f' from the keyboard?
1. readf ( f );
2. scanf ( "%f", &f );
3. scanf ( "&f", f );
12. Which of the following will NOT increase an integer variable "i" by 1?
1. i++;
2. i+=1;
3. i=i+i;
Prepared By:-
Mr. Pawar A. B.
70
14. Which of the following commands would read a single character from the keyboard and place the
result in a character variable 'ch' defined as:
char ch;
1. ch = getch();
2. printf( "%c", ch );
3. getkeyb ( ch );
15. Which of the following would you use to place a comment into your program?
1. REM This is a comment
2. /* This is a comment */
3. { This is a comment }
16.
Single line comment will be given by
1. //
2. /*_____________*/
3. REMARK
17. What number would be shown on the screen after the following lines of C are executed?
char ch; int i; ch='G'; i = ch 'A'; printf( "Number: %d\n", i );
1.
2.
3.
6
7
8
18. How would you copy the name "Hello" to a character array (i.e. string) declared as follows:char str[10];
1.
2.
3.
str = "Hello";
printf( str, "Hello" );
strcpy( str, "Hello" );
19. Which of the following switch statements will show the correct days of the week, where 0=Sunday,
1=Monday and 2 = Tuesday (the others are ignored). The initial day value is held in the variable 'day'?
(a)
switch ( day )
(b)
switch ( day )
(c)
switch ( day )
case(0): printf("Sun");
break;
case(1): printf("Mon");
break;
default: printf("Tue");
break;
case(0): printf("Sun");
case(1): printf("Mon");
case(2): printf("Tue");
break;
case(0): printf("Sun");
break;
case(1): printf("Mon");
break;
case(2): printf("Tue");
}
}
Prepared By:-
Mr. Pawar A. B.
71
20. Which of the following programs will correctly add up a list of five numbers and show the total?
int count, num, total;
(a)
total = 0;
(b)
total = 0;
count++ )
count++ )
(c)
total = 0;
for ( count=1; count<=5;
count++ )
{
total );
total );
21. Which of the following would you use to test if the variable 'i' contains 3, and if it is does display "YES"
otherwise display "NO"?
1.
2.
3.
22. Which of the following three programs would you consider to be well indented?
(a)
(c)
(b)
int i, j = 0;
int i, j = 0;
int i, j = 0;
printf("i:%d\n", i);
printf("i:%d\n", i);
printf("i:%d\n", i);
printf("j:%d\n", j);
}
}
printf("j:%d\n", j);
}
printf("j:%d\n", j);
}
}
23. Which command is used to skip the rest of a loop and carry on from the top of the loop again?
1. break;
2. resume;
3. continue;
24.What will be output of the following program:
int i=10;
if(i=12)
printf( = am in True)
else
Prepared By:-
Mr. Pawar A. B.
72
printf( = am in false)
a.
b.
c.
d.
I am in True
I am in false
Error
None of Above
else
printf( = am in false)
a.
b.
c.
d.
I am in True
I am in false
Error
None of Above
else
printf( = am in false)
a.
b.
c.
d.
I am in True
I am in false
Error
None of Above
a.
b.
c.
d.
4,5,6
4,6,6
4,4,5
6,6,4
Prepared By:-
Mr. Pawar A. B.
73
4,4,5
4,5,5
4,5,6
getch();
}
a.
b.
c.
d.
Error
1,2,3
2,3,4
None of Above
a.
b.
c.
d.
30.
Error
2,3,3
3,2,1
None of Above
What will be output of following program
int i=4;
printf("%d",i);
printf("\n%d",i--);
printf("\n%d",--i);
a.
b.
c.
d.
4,4,2
2,3,4
3,2,1
None of Above
printf("%d",x);
a.
b.
c.
d.
20
21
18
22
Prepared By:-
Mr. Pawar A. B.
74
a.
b.
c.
d.
6,5
5,6
6,7
6,6
Prepared By:-
Mr. Pawar A. B.
75
PART B
5. What are the three main types of computer programming languages?
(A) Machine language, assembly language, high level language
(B) Imperative language, functional language, declarative language
(C) COBOL, Fortran-77, C++
(D) A & C
6. From the point of view of the programmer what are the major advantages of using a high-level
language rather than internal machine code or assembler language?
(A) Program portability
(B) Easy development
(C) Efficiency
9. Compiler translates
(A) High Level Language into m/c Level Language
(B) m/c Level Language into high level Language
(C) Low level Language into m/c language
help of
(B) Both
(A) Compiler
(B) Linker
(C) Assembler
(D) Interpreter
19. Which language makes use of mnemonics instead of numeric op-codes & symbolic names for data
locations instead of numeric address?
(C) None
Mr. Pawar A. B.
76
(A) Interpreter
(B) Linker
(C) Assembler
(D) Compiler
(A) Interpreter
(B) Linker
(D) Compiler
(C) Assembler
23. Which program takes multiple object program files fits them together to assemble them into the
program's final executable form?
(A) Assembler
(B) Interpreter
(C) Compiler
(D) Linker
less effort?
(A) Intermediate Definition Language
(C) Machine Language
with very
(A) BASIC
(B) COBOL
(C) PASCAL
(D) FORTRAN
28. Which of the language was designed to solve the scientific & engineering problems?
(A) FORTRAN
(B) PASCAL
(C) BASIC
(D) COBOL
(A) 1960
(B) 1957
(C) 1980
(D) 1972
(A) COBOL
(B) BASIC
(C) PASCAL
(D) FORTRAN
(A) FORTRAN 77
(B) FORTRAN II
(C) FORTRAN N
(D) FORTRAN 90
(C) FORTRAN II
(D) FORTRAN N
(A) FROTRAN 77
(B) FORTRAN 90
35. Which Language was designed for business data processing applications?
(A) COBOL
(B) PASCAL
(C) BASIC
(D) FORTRAN
(A) COBOL 74
(B) COBOL 85
(A) PASCAL
(B) FORTRAN
(C) COBOL
(D) BASIC
(C) 1970
(D) 1985
(A) 1958
(B) 1964
(A) JAVA
(B) C++
(C) C
(D) BASIC
41. Which of the language can be used for both business & scientific applications?
Prepared By:-
Mr. Pawar A. B.
77
(B) PASCAL
(C) BASIC
(A) 1971
(B) 1984
(C) 1956
(D) 1949
(B) BASIC
(C) C
(D) PASCAL
(C) 1983
(A) 1971
(B) 1960
(A) 1964
(B) 1952
(C) 1980
(D) 1978
(A) 1959
(B) 1968
(C) 1952
(D) 1978
(A) FORTRAN IV
(B) FORTRAN 77
(C) FORTRAN 90
(D) FORTRAN II
(A) 1964
(B) 1954
(C) 1975
(D) 1966
ANSWERS
5. A
18. C
30. B
41. D
21. D
19. B
31. D
42. B
6. D
20. A
32. C
43. A
9.A 11. D
12. A
13. B
14. A
15. C
16. D
17. A
22. 23. D
24. A
25. D
26. A
27. D
28. B
29.C
33. A
34.B
35. A
36. C
37. C
38. A
39. A
40. D
44. C
45. C
46. C
47. D
48.B
49. A
50. D
A. C++
B. Java
C. C
B. Machine Language
C. Assembly language
D. C language
3. Which of the following translates the source program statements into object codes?
(A)Debugger (B)Interpreter
4.UNIX is closely associated with
(A)Java
(B)C
( C)Assembler
(D)Compiler
(c )PASCAL
(A)C
(B)COBOL
(c )PASCAL
(D)FORTRAN
n interpreter reads
code of the program one line at time
(A)Executable (B)source (C )Machine
(D)None of the above
9 BCPL is said to be the predecessor to the
language
(D)C
(A)C++
(B)PASCAL
(C)Java
7
10.A Compiler is
(A)a combination of computer
(B)a program which translates from one
(C)a program which translates from one
(D)None of
these
Mr. Pawar A. B.
78
(A)Application programs
(B)Operating system programs
(C )packaged programs
(D)All of these
12.Assembly language
(A)used alphabetic
codes
(B)is the easiest language to write machine language
(C )Place of binary numbers used programs machine language need
(D)None
of
not be translated
into
these
17
hardware
18.Multiprogramming systems
(A) Are easier to develop than single
(B)Execute
each
job
programming
(D)None
systems
faster
19
is
executed
(A) Compile and go loader (B) Boot loader
(C) Bootstrap loader
(D) Relating loader
24.
which of the following operation systems do you choose to implement a client-server
(A) MS DOS (B) Windows 98
( C) Windows 95
(D) Windows 2000
25.
The operating' System manages
.
network
Mr. Pawar A. B.
79
28.
Out of following, what is Opcode in assembly language?
(A) mov
(B) add
(C) cmp
(D) None
29.
Who converts Assembly language into machine language?
(A) Linker
(B) Assembler
(C) Interpreter
(D) Compiler
30.
Compiler converts source code into(D) Assembly Language
(A) Object code
(B) Comment
(C) Test cases
31.
IDE stands for 32.
(A) C
33.
(C) C++
(A) C
34.
(B) BASIC
(B) BASIC
(C) C++
(D) Java
(A) FORTRON
(B)MATLAB
(C) COBOL
(D) BASIC
35.
(C) Portability
41.
44.
45.
Application
46.
Mr. Pawar A. B.
80
49.
ANSWER KEY
1. D 2. B 3. D 4. B 5. C 6. A
11. D
12. A
13. B
14. A
15. B
21. B
31. A
41. A
2.
22. D
32. B
42. C
23. C
24. D
33. D
43. A
28. A
37. B
47. A
29. B
38. C
48. C
30. A
39. D
49. A
40. C
50. A
(B) Union
(C) Structure
(B) C
(C) JAVA
(D) BASIC
(A) 1964
5.
27. C
36. D
46. C
(A) PASCAL
4.
26. B
35. B
45. A
20. A
(A) Pointer
3.
25. D
34. A
44. C
7. B 8. C 9. C 10. B
16. A
17. C
18. C
19. B
(B) 1983
(D) 1968
(C) 1989
Which of the language was primarily used for internet based applications?
(A) C
7.
(B) JAVA
(B) 1966
(B) J2SE
14.
(B) LISP
(C) COBOL
(D) C
(D) English
(A) PASCAL
12.
(D)J2EE
(C)JSP
(D) 1995
(C) 1983
(D) COBOL
(A) 1952
8.
(C) LISP
Mr. Pawar A. B.
81
(B) b
(B) Pr
(C) P
(A) Architecture
20.
(C) bl
(A) ptr
19.
(A) bol
18.
(B) Comment
(D) History
Comments are -
(C) Brackets
23.
24.
25.
Installation describes?
(A) How to write the program
(C) How to install the program
(A) Documentation
29.
31.
32.
33.
34.
(C) Testing
............... refers to the process of collecting, organizing and maintaining a complete record of
programs and other documents used during the different phases of software development.
(A) Debugging
30.
(B) Debugging
(B) Documentation
(D) Testing
are the forms of documentation that are put within program to help in understanding the
logic of the program.
(A) System manual
(B) User manual
(C) Comments
(D) Logic Errors
does not contain any programming instruction and are just language instructions.
(A) User Manual
(B) Comments
(C) System Manual
(D) None
arguments the code with the basic description and also help in generating external
documentation.
(A) Comments
(B) Hungarian Notation (C) User Manual
(D) None
is a form of external documentation and is available in the form of separate documents or unit
development folders
(A) Hungarian Notation (B) User Manual
(C) Syntax errors
(D) System Manual
.... is a form of external documentation and is required to ensure smooth execution of software ..
Prepared By:-
Mr. Pawar A. B.
82
36.
37.
(C) cd
(D) fd
(B) Linker
(C) Compiler
(D) Debugger
A component of a computer that locates a given program or application from the offline storage,
loads it into the main memory and facilitates its execution is called_______.
(A) Interpreter
42.
(D) Testing
The software tool that. is used for linking modules together is called _______.
(A) Editor
41.
(A) md
40.
Following is the DOS command to print the file' add.c ' without installing a printer driver on your
PC.
(C) Comments
In..... the name of the variable indicates its type of intended use.
(A) Debugging
(B) Hungarian Notation (C) System Manual
(D) Logic Errors
..... is said to be a popular naming convention in complete programming
(B) Compiler
(C) Linker
(D) Loader
(C) Interpreter
(D) Loaders
(A) Linker
(B) Compiler
ANSWERS
1. A
11. B
2.A
3. B
12. C
21. A
31. B
41. D
22. B
32. A
42. D
4.C
13. D
5.A
14. A
23. C
33. D
24. B
34. B
6.B
15. B
7.D
16. C
25. B
35. C
8.A
17. B
26. C
36. B
9.C
18. C
27. A
37. B
10. D
19. A
28. A
38. A
20. D
29. B
39. A
30. C
40. B
1. Flowchart is used to _
(B) Flowchart
(D) Test case
(A) Flowchart
(B) Algorithm
(C) None of the above
(D) Pseudo code
6.By using .......................... , Algorithms (Program logic flow) can be shown in pictorial way.
(A) Program
(B) Flowchart
(C) Test Case
(D) Pseudo code
7. Processing Symbol is used to indicate
in the program.
(A) Process (i.e. Arithmetic process) (B) Input and Output
(C) Decisions
(D) Start and End
Prepared By:-
Mr. Pawar A. B.
83
(A)
(B)
Disk checking
B)Flowcharting
Pseudo coding
D)Testing
17. What is the problem with following statement?
100 =grade
(A)
100 is not a reasonable grade
B)100 should be in quotes
(B)
Data type do not match
D)Value on the left must be a variable name
18. What might be considered the seventh step of programming process?
(A) Testing
(B) Maintaining
(C) Replacing
(D) Converting
(A) Square
(B) Circle
(C) Parallelogram
(D) Triangle
(A) Circle
(B) Lozenge
(C) Diamond
(D) Square
(A) =
(B) *
(C) ^
(D) %
(A) 1
(B) 12432
(C) oops
(D) O
23. In some programming language programmer must write a variable ______ telling the compiler
what
Prepared By:-
Mr. Pawar A. B. 84
(A) Name
(B) Termination
(C) Decision
(D) Declaration
Get number
Get another number
If first number is bigger than second then
print first number
Else
print second number
(A)
Sequence
B)Decision
C)Loop
D)Nested
Get number
Get another number
Add number
Print result
A)Sequence
B)Decision
D)Nested
C)Loop
Do step a
Do step b
if condition c is true then
Do step d
else
Do step e
end if
while condition f is true
Do step g
end while
(A)
Nesting
B)Stacking
C)Posttest
D)Pretest
Do step e
else
Do step b
Do step c
Do step d
end if
(B)
Nesting
B)Stacking
C)Posttest
D)Pretest
28. In a case structure the term------means if none of the other cases were true
(A) Else
(B) Then
(C) Default
(D) Loop
(A) Then
(C) Do
(B) While
(D) Else
(A) Execution
(C) Iteration
(B) Selection
(D) Case
(A) If-then-else
(C) Do-until
structures.
(B) Do-while
(D) While
Prepared By:-
Mr. Pawar A. B.
85
32. Which name is best suited to a module that calculates overtime pay?
(A) CalcoO
(B) CoO
(A) Flowchart
34. In a __ program, the user sees a screen and can typically make Selections using a mouse or other
pointing device.
(A) Reusable
(B) Modular
(C) Housekeeping
(A) Size
(C) Style
(B) Length
(D) Type
38. Some use a variable-naming convention called __ notation, in which a variable's data type or other
information is stored as part of the name. For example, a numeric field might always start with the
prefix num.
(A) Prefix
(B) American
(C) Polish
(D) Hungarian
(A) Set
(B) Instantiated
(C) Defined
(D) Documented
D) Null case
Mr. Pawar A. B.
86
(A)Assertion
(C)Negation
(B)Comparison
(D)No Action
48. A program design tool in which standard graphical symbols are used to represent the logical flow of
data is called as a
_
(D) Structured Chart
(A)Flowchart
(B)Pseudocode (C)Algorithm
49. Which of the following is 8.n iterative control structure?
(A)Decision Making
(B )Sequential
(C)Jump
(D)loop
(A)Sequential
(B)Decision
(C)
Iterative
(D)All of above
ANSWERS
1.A
11. A
21.A
31.A
41.B
2.C
12. C
22.C
32.D
42.A
1.
2.
3.
3.C
13. B
23.A
33.C
43.D
4.D
14. C
24.B
34.C
44.D
5.B
15. D
25.A
35.A
45.A
(C) Terminal
4.
8.
9.
9.B
19.C
29.D
39.B
49.D
10.C
20.A
30.C
40.C
50.D
8.A
18.B
28.C
38.D
48.A
(A) Processing
(C)Terminal
6.
7.A
17.D
27.A
37.D
47.D
6.B
16.C
26.A
36.D
46.D
(C) Pseudocode
(D) Algorithm
Mr. Pawar A. B.
87
10.
11.
(A) Program
(B) Algorithm
(D) Flowchart
12.
13.
14.
(A) Start
(C) End
15.
20.
22.
(B) Rhombus
(D) Rectangle
Amongst the following symbols, which of the following is not a symbol used in a flowchart?
(A) Diamond
21.
(B) Connector
(D) repetition
Which of the following shape is used for representing a Conditional Statement in a Flow chart?
(A) Star
(C) Input-Output Box
19.
(D) Psudochart
(A) Parallelogram
(C) Trapezoid
18.
(A) Sequence
(C) Decision
17.
(B) Decision
(C) Flowchart
16.
(B) Parallelogram
(C) Rectangle
(D) Cylinder
A good algorithm should not ___.
(A) Execute for a given set of initial conditions
(B) Produce the correct output
(C) Terminate after finite number of steps
(D) Result into ambiguous state
_______is used to write the algorithms.
(A) Computer Language 'c'
(B) Computer Language 'C++'
(C) Any Programming Language
(D) English Language
Prepared By:-
Mr. Pawar A. B.
88
(A) Compiler
(C) Psuedo Code
24.
Which amongst the following flowchart symbols is a ' two way' branching symbol?
(A) Parellogram
(C) Diamond
25.
(B) Connectoer
(D) Rectangle
(A) Decision
(C) Termination
26.
27.
28.
29.
30.
31.
33.
(B) Processing
(D) Input and Output
(A) Assertion
(C) Negation
32.
(B) Comparison
(D) No Action
A program design tool in which standard graphical symbols are used to represent the logical flow
of data is called as a
(A) Flowchart
(B) Pseudocode
(C) Algorithm
Any program can be written using
'DO ... WHILE' and 'REPEAT .... UNTIL' structure are called
36.
37.
38.
Mr. Pawar A. B.
89
(B) input-output
(D) Indicate flow of program
Which of the following is not used as a logic structure while writing 'C' programs?
(A) Parallel
(C) Random
42.
(B) Sequential
(D) None above
The symbol is used to indicate the beginning, ending, and pauses in the program logic flow.
(A) Flowlines
44.
45.
(B) Processing
(C) Input/Output
(D) Terminal.
To write the correct and effective program we must first
(A) Draw a flowchart
(B) Plan its logic
(C) Write the pseudocode
(D) All ofthe above
Pseudocode is also called as the
(B) Microflowchart
(A) Program Design Language (PDL)
(C) imitation
46.
(D) Decision.
(A) Development
(C) design
47.
48.
(B) Coding
(D) debugging.
Which logic is used to select the proper path out of two or more alternative paths in the program
logic?
The________is a program-planning tool that allows the programmers to plan program logic by
writing program instructions in an ordinary language
(A) Flowchart
(C) Program
(B) Pseudocode
(D) Looping
Answers
1. A
11. B
21. D
31. D
41. B
2. C
12. D
22. D
32. A
42. C
3. D
4. A
13. D
23. D
33. D
43. D
5. A
14. B
24. C
34. B
44. D
6. A
15. B
7. D
16. B
25. D
35. C
45. A
8. C
17. B
26. D
36. A
46. C
9. C
18. A
27. B
37. B
47. C
10. A
19. D
28. A
38. C
48. A
20. D
29. B
39. D
49. D
Prepared By:-
30. B
40. B
50. B
Mr. Pawar A. B.
90
Which of the following is used for making the next iteration of the loop to be started?
(A) break
4.
7.
8.
9.
(B) case
(C) continue
(A) Rectangle
11.
12.
(C) Ellipse
(B) Diamond
(A) Sentinel
15.
(B) Counter
(D)BothA&B
(D) top-down,right-Ieft
An algorithm is represented as
(A) Programs
17.
(C) Algorithm
(C) down~up,left-right
16.
(D) Circle
(C) Output
(D) Decision
Prepared By:-
Mr. Pawar A. B.
91
(A) Flowchart
19.
20.
21.
22.
23.
24.
25.
3.C
16.D
4B
17.D
5. A
18.C
6. A 7. C
19. A 20. A
8. D 9. B
10. D
11. C 12. C 13. D
21. C 22. C 23. B 24. D 25. C
(A) Float
(B) Double
(A) #
(B)-
(C)$
(D) &
(A) Tab
(A) First
5. The
(B) Third
(D) Fourth
(A) Real
6. The
(C) Second
(B) Character
(C) Integer
(D) Float
(A) Float
(B) Integer
(C) String
(D) Character
(A) Character
(B) String
(C) Integer
(D) Identifiers
(A) Float
(B) Double
(C) Integer
(D) Character
(A) String
(B) Constant
(C) Integer
(D) Double
(A) float a, s;
(B) char p, q;
(C) int
x, y;
Mr. Pawar A. B.
92
11. The constants in c can express in both fractional & exponential forms.
(A) String
(B) Character
(C) Real
(D) Integer
comma
(A) 2.5
(B) 0
(C) 3
(D) 2
(A) 1.5
(B) 2.0
(C) 0
(C) -1
(D)-5
(A) 1
(B) 0
(A) #
(B) *
(C) &
(D)@
(A) 8
(B) 0
(C) 10
(A) 16
(B) 2
(D) 8
(C) 4
(A) 1
(B) 0
(C) 2
(D) 5
24.
48 to 57 is said to be the ascii range for
.
(A) a to z
(B) A to Z
(C) 65 to 70 (D) 0 to 9
25. What is the ascii range for a to z letters?
(A) 97 to 122
(C) 0 to 9
(D) 90 to 120
(A) gets ()
(B) puts()
(C) getche()
27
array always ends with a null ( \ 0) character
(A) Integer
(B) String
(C) Character
(D) scanf ()
(D) Float
(B) Zero
(A) Array
(B) Constants
(C) Variables
(D) int_ptr z
Mr. Pawar A. B.
93
(C) Defined
(D) Verified
(A) an alphabet
(D) Both C and B
(B) a number
(A) Float
(B) Union
(C) Array
(D) Pointer
(C) Constants
(A) Keywords
(B) Variables
(A) !
(B) #
(C) -
(D) ;
(A) \a
(A)\a
(B)\b
(C)\m\
(D)\n
(A) 8
(B) 16
(C) 32
(D)64
(A) 2 byte
(B) 4 byte
(D) 16 byte
(C) 8 byte
(A) 2 byte
(B)4 byte
(C) 8 byte
(D) 16 byte
(A) 1 byte
(B) 4 byte
(C) 8 byte
(D) 16 byte
(C) 8 byte
(A) 1 byte
(B) 4 byte
(A) a = 5
(B) a += 5
(C) a = b = c
(D) a = 5
1. C 2. A 3. B 4. C 5. B 6. C
11. C
12. B
13. A
14. A
15. D
21. B
31. C
41. A
1.
22. C
32. A
42. B
23. A
33. B
43. D
24. D
25. A
34. D
44. A
7. D
16. D
26. A
35. C
45. B
27. C
8. A 9. D
17. B
10. A
18. A 19. C
28. B
29. C 30. D
20. A
Mr. Pawar A. B.
94
(B) Bitwise OR
(D) Logical OR
(A) :=
4.
6.
7.
(B) ==
(C) ->
(B) Left to Right
(A) *
10.
11.
(B) I
(C) ++
13.
14.
(C) II
(D)" "
(B) cast ()
(C) Disjunction
(D) Separation
(A) a = a + 4
(C) a = 4
(D) a = 4 + 4
(B) a + 4 = a
(D) +
(A) (type)
12.
(B) constS
(C) symbols
(A) \N
21.
(B) Address
(A) #define
20.
Which pair of functions below are used for single character IO.
(A) getchar ()and putchar ()
(B) gets () and puts ()
(C) scanf() and printf()
(D) fgets () and fputs 0
The output of printf ("%u", -1) is
(A) -1
(B) minimum int value
(C) maximum int value
(D) Error message
An Ampersand (&) before the name of a variable denotes ...............
(D)+
(D) ==
(A) *
8.
(C) =
(B) .EQ.
(B) \0
(C) \0
(D) \e
Mr. Pawar A. B.
95
(B) :
24.
25.
(B) 0
27.
(B)auto
29.
(D) ?
(C)external
(D)scanf
(A) Four
28.
The conversion characters '%s' for data input means that the data item is
(A) An unsigned decimal integer
(B) A hexadecimal integer
(C) A short integear
(D) A string followed by white space
An expression contains relational, assignment and arithmetic operators. If Parenthesis are not
present, the order will be
(A) Assignment, relational, Arithmetic
(B) Relational, arithmetic, assignment
(C) Assignment, arithmetic, relational
(D) Arithmetic, relational, assignment
Which of the following is a key word is used for a storage class
(A)printf
26.
(D) .
(A) ++
23.
(C) NULL
(B) Six
(C) Three
(D) Done
In C, a Union is
(A) memory store
(B) memory screen (C) memory location
(D) None
A multidimensional array can be expressed in terms of
(A) Array of pointers rather than as pointers to a group of continuous array
(B) Array without the group of continuous array
C allows arrays of greater than two dimensions, who will determined this
(A) Parameter
31.
(B) Compiler
Programmer
(C)
Pointers are of
(A) 28
34.
35.
36.
(B) 32
(C) 35
(D) 40
If the size of the array is less than the number of initialises then,
(A) Extra values are being ignored
(B) Generates an error message
(C) Size of array is increased
(D) Size is neglected when values are given
Array subscripts in C always start at
(A) -1
(B) 0
(C) 1
(D) Value provided by the user
A Structure
(A) Cannot be read as a single entity
(B) Can be read as a single entity
38.
(A) #
(B)_
Mr. Pawar A. B.
96
(A) # define sl s2
40.
(C) #define sl = s2
(B) /
(C) #
(D)?
(B) begin ()
(C) start ()
(D) init ()
(B) ~
(D) 1\
(C) %
(A) !
46.
(B) >
(B) +
50.
(D)&&
(C) %
(D)/
(B) AND
(C) &&
(D)@@
lf the value of a = 10 and b = -1, the value of x after executing the following expression is
x = (a != 10) && (b=1)
(A) 0
49.
(C) "
(A) II
48.
(A) ++
47.
(A) **
44.
(A) main ()
43.
(A) \
41.
(B) 1
(C) -1
(D) 10
z = x++ -
--y*b/a;
(A) 5
(B) 10
(C) 11
(D) 1
ANSWERS
1. A
2. D
3. D
4. B
5. A
6.A
7. C
8. A
9. D
10. B 11. A 12. A
13. A
14. B 15. B
16. A
17. C
18. B
19. B
20. B
21. A
22. D
23. D
24. D
25. B
26.A 27. B
28. A 29. A
30. B
31. C
32. D
33. D
34. B
35. B
36.A 37. A
38. A
39. A
40. A 41. E
42. A
43. A
44. A
45. B
46.A 47. C
48. A
49. A
50. D
4.
(A) \t
5.
6.
(C) \n
8.
9.
Which of the variables can have many declarations but only one definition?
(D) All the above
(A) Local variable
(B) Global variable
(C) Static variable
Which function gets execute as we execute a 'C' program?
(A) Printf ()
7.
(B) %d
(B) Main ()
(C) MAIN ()
(D) main ()
(A) Unsigned
(C) Signed
(B) Long
(A) Constants
(B) Identifiers
(C) Keywords
Mr. Pawar A. B.
97
(A) Integer
12.
(B) Double
17.
18.
19.
(D) Public
(C) Private
(B) Printf
(C) else
void *ptr;
myStruct myArray[10];
ptr = my Array;
Which of the correct way to to increment the variable ptr?
(A) Ptr = ptr + sizeof(myStruct);
(B) ++(int*)ptr;
(C) Ptr = ptr + sizeof(myArray);
(D) Increament(ptr); ptr= ptr + siazeof (ptr)
"My salary was increased by 15 %!" Which of following statement will produce exact statement?
(A) printf (" \ " My salary was increased by 15%%! \"\n");
(B) printf ("My salary was increased by 15%! \n");
(C) printf ("My salary was increased by 15'%' ! \ n");
(D) printf("\''My salary was increased by 15 \ % \! \"\n");
What is difference between a declaration and a definition of variable?
(A) Both can occur multiple times but declaration can occur only once
(B) A declaration can occur once, but definition can occur many times
(C) There is no difference between them
(D) A definition occurs once, but declaration can occur many times
int testarray[3] [2] = {1, 2, 3, 4, 5 ,6,7 , 8, 9,10, 11, 12}
What is value of testarray[2][1][0]?
(A) 3
20.
The value of the variable can be kept variant by using which keyword?
(A) Char
16.
.
(C) Spaces
(A) Constant
15.
(D) Float
(C) Character
(B) Hyphen( -)
(D) Variable
(A) Number
13.
(B) 1
(C) 9
(D) 7
int a=10,b;
b=a++ + ++a ;
printf ("%d, %d, %d, %d",b,a++ ,a,++a) ;
What is output of above code?
(A) 12,10,11,13 (B) 22,10,11,13
(C) 12,11,11,11 (D) 22,13,13,13
21.
int *ptr,y;
ptr = x + 4;
y = ptr -x;
What does y in sample code above equal?
(A) -3
22.
(A) 1
23.
(B) 0
(C) 4
(C) 6
(D) 8
(B) 14
#define MAX_NUM 15
Mr. Pawar A. B.
98
(A) 22
25.
26.
27.
(C) 46
(B) 26
(D) 70
int var1;
if a variable has been declared with file scope, as above, can it safely be accessed globally?
(A) No it would need to have been globally initially declared using global keyword.
(B) Yes; it can be referenced through register specifier
(C) Yes; it can be referenced by public specifier.
(D) No; it would need to have been declared with static variable.
time_t t;
Which one of the following statements will properly initialize variable t with current time?
(A) t = etime();
(B) t = localtime ();
(C)t = clock();
(D) time(&t);
char *ptr;
char mystringD = "abcdefg";
ptr = myString;
ptr+=5;
What string does the ptr points?
(A) defg
28.
(C) cdefg
(B) fg
(D) efg
Answers :
4.A
15.D
26.C
1.
5.B
16.A
27.B
8.
9.
10.
12.D
23.D
13.A
24.B
14.B
25.A
(c) Declaring it
D. If else
D. Goto
C. Break
C. For()
D. If statement
We can select one task switch between the function in a program by using ..............statement
A. While() statement
B. Switch() statement
D. If statement
A. abs()
7.
11.C
22.B
C.Do while
B. Switch() statement
C. Do while () statement
6.
10.D
21.C
A. Do while()
5.
9.B
20.D
A. Exit
4.
8.A
19.C
In which of the case the default statement "all the case statement are false "is executed?
A. For
3.
7.C
18.B
What action is exactly performed when the prototype of the function is mentioned?
(A) Defining it
2.
6.D
17.D
28.A
B. s
C. pow()
Mr. Pawar A. B.
99
The control statement that allows us to make a decision from number of choice is called
B. switch statement
C. if loop
D. for loop
Which header file is essential for using strcmp() function?
A .structure
12.
A. text.h
13.
19.
B. 3
C. -1
D. NULL
B. if-else
C. goto
D. for
B. strcpy.h
C. files.h
D. string.h
B. Parenthesis
C pair of /s
D. Curly braces
B. A C interpreter
D. An analysing tool
The continue command cannot be used with
B. while
C. do
D. for
A. argc
24.
D. 5
A link is
A. switch
23.
C. 4
B. 0
A. A computer
C. An active debugger
22.
D. stdlib.h
A. Double quotes
21.
B. streams.h C. stdio.h
A. strings.h
20.
D. mem.h
A. Do-while
18.
C. stdio.h
A. 1
17.
B. conio.h
A. 2
16.
D. string.h
A. files.h
15.
C. strings.h
A. stdlib.h
14.
B. strcmp.h
B. argv
C. Both A & B
D. None of these
C. A & B both
25.
C. A & B both
26.
27.
A. unalloc()
28.
B. free()
C. dealloc()
D. release()
char*myFunction(char*ptr)
{
ptr +=3;
returnptr;
}
Prepared By:-
Mr. Pawar A. B.
100
int main()
{
char *x, *y;
x =:ello
y = myFunction(x);
printf(y = %s y)
}
What will be output of program?
A. y= Hello
B)y= ello
C.y= llo
D)y= lo
29.
void myFunc(int x)
{ if(x>4)
myFunct(--x);
printf(%d x)
}
int main()
{
myFunc(5);
return 0;
}
What will be code print?
A. 0,0,1,2,3,4
30.
Which function is correct choice for moving binary data that are of arbitrary size and position in
memory?
A. memcpy()
B. Strncpy()
C. memset()
D. memmove()
31.
Which one of following provides conceptual support for function call?
A. The system stack
B.The data segment
B. The processors registers
D. The text segment
32.
int i,j:
int ctr = 0;
int myArray[2][3];
for(i=0;i<3;i++)
for(j=0;j<2;j++)
{
myArray[j][i]=ctr;
ctr++;
}
What is value of myArray[1][2]?
A. 2
33.
B. 3
C. 1
D. 5
int x=3;
if(x==2)
x =0;
if(x==3)
x++;
else
x+=2;
What will be the value of x?
A. 1
B. 3
C. 4
D. 5
Prepared By:-
Mr. Pawar A. B.
101
x=3,counter=0;
while((x-1))
{
++counter;
x--;
}
What will be value of counter?
A. 0
B. 1
C. 2
D. 5
35.
B. typedefsighandler_t
void(*)(int);
C. #define sighandler_t
void(*)(int);
D. Typedef
void(*sighadler_t)(int);
struct customer *ptr =
malloc(sizeof(struct customer));
Give then sample allocation for the pointer found above, which of the following statement is used to
reallocptr to be an array of 10 elements?
A. ptr+=malloc(9*sizeof(struct customer));
B. realloc(ptr, 10 *sizeof(struct customer));
C. ptr= realloc(ptr, 10*sizeof(struct customer));
D. relloc(ptr, sizeof(struct customer));
36.
37.
shorttestarray[4][3]= {{1},{2,3}.{4,5,6}};
printf(%d\n sizeof(testrray))
What will be output assuming short need 3 bytes?
A. 6
B. 7
C. It will not compile since not enough initializations
D. 24
char buf*+ =hello World!
char*buf= hellow World!
in term of code generation do above initializations differ?
A. The first definition certainly allow the contents to be safely modified at runtime; the second does not
B. They do not differ they are functionally equivalent
C. The first definition is not legal because it does not indicate the size of array to be allocated, the second
38.
one is legal.
D. The first definition allocates enough space for a NUL_ character, nor does it append one; he second
definition does.
39.
A. &&
C. ||
40.
B. @@
D. AND
:ow to print()s format specifier %e and %f differ in their treatment of floating number?
A. %e display a double in engineering notation if the number is very small or very large. Otherwise it
behaves like %f and displays numbers in decimal notation
Prepared By:-
Mr. Pawar A. B.
102
B. %e display a argument of type double with trailing zeros and %f never displays trailing zeros
C. %f and %e both expect a corresponding argument of type double and format it identically. %e is left over
from K && C; standard C prefers %f for new code
D. %e always display and argument type double I engineering notation %f always displays ad argument of
type double in decimal point
41.
Which one of the following will read a character from the keyboard and will store it in the variable C?
A. c = getch();
B. C = getchar();
C. c = getchar(stdin); D. getchar(&c);
42.
#include<stdio.h>
int I;
void increment(int i)
{
i++;
}
int main()
{
for(i=0;i<10;increment(i))
printf(i=%d\n i)
return 0;
}
what is output of above program?
A.
B.
C.
D.
i=9;
it will not compile
i=10
43.
case 3:
i+=5;
if(i==8)
{
i++;
if(i==9)break;
i*=2;
}
i-=4;
break;
case 8:
i+=5;
break;
}
printf(i=%d\n i)
what will be output of the sample code above be?
A. i=5;
44.
B.i=9;
C. i=10;
D.i=18;
A. ->
B. []
Prepared By:-
Mr. Pawar A. B.
103
C. =
D. ,
45.
How do you include a system header file called sys header .h in C source file?
A.
B.
C.
D.
#incl<sysheader.h>
#includefile<sysheader>
#includesysheader.h
#include<sysheader.h>
47.
Which one of following printf()format specifier indicates to print double value in decimal notation, left
align in a 30 character forrmat field 4 digit precision?
A.
B.
C.
D.
%30f.4e
%4.30f
%30.4f
%4.30e
48.
int x=0;
for(;;)
{
if(x++=4)
break;
continue;
}
printf(x=%d\n x)
what is the output of above code?
A.
B.
C.
D.
x=5
x=0
x=4
x=1
49.
According to the standard C specification what are the respective minimum size of following three
data types :short,int,long?
A. 1,2,2
B. 1,2,4
C. 2,4,8
D. 2 ,2,4
50.
{
char letter=Z
printf(\n %c letter)
}
A. 90
B. Z
C. Error
Prepared By:-
Mr. Pawar A. B.
104
D. Garbage Value
Answers:
1. C
11. B
21. D
31. A
41. B
2. B 3. C 4. D
12. D 13. A 14. C
22. A 23.C 24.B
32. D 33.C 34.C
42. D 43.A 44.C
5. B
15.B
25.A
35.D
45.B
6. A
16.B
26.A
36.C
46.D
7. A
17.C
27.B
37.D
47.C
8. B
18.A
28.D
38.B
48.A
9. A
19.D
29.D
39.A
49.B
10. B
20. D
30. D
40. D
50. B
1.
What will be output of following program?
#include <stdio.h>
#define a 10
void main()
{
printf(%d
a)
foo();
printf("%d .. "
,a);
}
void foo()
{
#undef a
#define a 50
(B) 10.15
(C) Error
(D) 0
(A) 10.10
2. Array is passed as an argument to a function is interpreted as
(A) Address of array
(B) Number of elements in array
(C) Value of the first element in array
(D) Address of the first element of
3.
main()
{
char thought [20] [30] = {"Don't walk in front of me .. ", "1 may not follow" };
printf("%c%c", * (th ought [0]+9), *(*(thou ght+0)+5));
}
(B) kk
(C) 444
(D) 433
(D)K
4.
#include <stdio.h>
void main()
{
k=&j;
printf("%d%d %d", *j, **k, *(*k));
}
(A) 000
(B) 333
Mr. Pawar A. B.
105
(D) None
(A) Only a
(B) Only b
(D) None
8. main()
{
Struct
{
int i;
}xyz;
(*xyz)->i=10;
printf("%d" ,xyz.i);
What will be the output?
(A) Program will not compile
9. Pushdown list means:
(A) Stack
(B) Queue
(B) No answer
(C) 10
(D) Address of i
#include<stdio.h>
main()
{
char str*+=S\005 B
printf(" \ n %d" ,sizeof(str);
}
(A) 7
(B)
(C) 5
(D) Error
2. takes 2 parameters
4. requires a file pointer
12. #include<stdio.h>
Void main()
{
int a;
print(%d a^a)
}
(A)
1
B)0
C)Unexpected D)Runtime error
.
13. Time taken for addition of element in queue is
(D) None of these
(A) O(1)
(B) O(logn)
(C) O(n)
14. To delete a dynamically allocated array names 'a' , the correct statement is
(A) delete a[10];
(B) delete [] (C) delete a; (D) delete [O]a;
Prepared By:-
Mr. Pawar A. B.
106
void swap(int&x,int&y)
{
x+=2; y+=3;
}
(A) Error
(C) 14,24
(B) 10,20
(D) 11,21
(A) A
(C) C
(B) B
(D)D
int a=0,b=0;
a=(b=75)+9;
printif(" \ n%d%d",a,b);
}
(A) 75,9
(B) 84,75
(C) 75,84
(D) None
19. When applied to a variable, what does the unary & operator means?
(A) The variable value
(B) The variable format
(C) The variable address
(D) The variable's right value
20. FILE
(A) F=EOF()
(B) eof(f);
(C) feof(f)
(D) f=NULL
21.
Global variables that are declared static are------------ .
Which one of the following correctly completed the sentence above?
(A) Deprecated by standard C
(B) Allocated to Heap
(C) Internal to the current translation unit
(D) Visible to all translation units
22.
According to standard C, what type of an unsuffixed floating point literal, such as 123.45?
(A) float
(B) double
(C) unspecified
Mr. Pawar A. B.
107
23.
Which one of the following valid for opening a read-only ASCII fIle?
(A) fIleOpen(fname,"r");
(B) fIleOpen(fname,"ra");
(C) fopen(fname,"r");
(D) fIleOpen(fname,"read");
24.
f = fopen(fname,"r"); Referring to the code, what is proper definition of variable
f from
following?
(A) FILE f;
(B) File *f;
25.
short int x; // x is 16 bits
(C) int f;
What is the maximum number that can be printed using printf("%d"\ n",x)
(A) 127
(B) 128
(C) 65,536
(D) 32,767
26.
char *dwarves[]={"Sleppu", "Dopey""Doc","happy" ,"Grumpy''''sneezy","Bashful",};
how many element will dwarves will contain? Assuming c compiler
requirements of standard C.
(A) 4
(B) 5
(C) 6
(D) 7
28.
(A) 6
(B) 7
29.
Penny = one
(C) 8
(D) 9
Nickel = five
Dime = ten
Qurter = twentyfive
How is enum is used to define the values of the American coins listed above?
(A) enum
(B) enum
coin( (penny, l),(nickel,5),
coin(penny= 1,nickel=5,
(dime, 10),(quarter,25);
dime=10,quarte=25);
(D) enum
coin(penny=1,nickel=5,
coin{penny,nickel, dime=10,quarter=25}
30.
A) 11
B) 12
C) 21
D) 20
Mr. Pawar A. B.
108
z=x/I;
printf("z = %.2f\n",z);
What will above code print?
(A) Z=1.00
(C) Z=O.OO
32.
(B) Z=1.50
(D) Z=2.00
(A) go_cart
33.
(B) 4season
(C) run4
(D) _what
long factorial(long x)
????
return x*factoriai(x-1);
}
35.
(A) 40
36.
37.
(B) 0.004
(C) 400
(D) 4000
int u;
int *ptr = x;
????????
for (u=0,u<5;u++)
{
printf(%d- x*u+)
}
printf(\n)
Which one of following will replace the ????in the code above to cause string 1-2-3-10-5- to be
printed?
(A) *ptr + 3 = 10
(B) *ptr[3] =10
(C) *(ptr+3) = 10
38.
(D) (*ptr)[3] = 10
#include <stdio.h>
Void func()
int x=0;
static int y=O;
Prepared By:-
Mr. Pawar A. B.
109
x++,y++;
printf("%d%d \ n" ,x,y);
}
void main()
{
Func();
Func();
return 0;
}
(A) 1-1
2-1
(C) 1-1
1-2
39.
40.
(A) 1949
41.
(B) ISO
(C) 1958
(D) 1966
(C) BSI
(D) ANSI
1.
ANSIC
2.
3.
4.
ANSI COBOL
ANSI ADA
(A) 1,2,3,4
(C) 4,3,1,2
43.
(B) 1975
(A) X3
42.
(B) 1-1
1-2
(D) 1-0
1-0;
(D) 1,3,2,4
(D) 1,3,42
(A)
2 and 4
(B) 1 and 3
(C) 1,2 and 4 only
Mr. Pawar A. B.
110
(D) None
46.
47.
I. Java
II. Html
III. COBOL97
IV.ADA95
(A) I and N only
#define max 10 +2
void main()
{
int i;
i = max*max;
clrscr();
printf("%d" ,i);
getch();
}
(A) 32
(B) 60
(D) 19
(C) 12
Void main()
{
char *str1=powla
char *str2=er
clrscr();
printf("%s \ b \ b%s",str1,str2);
}
(A) powlaer
(B) powler
(C) power
(D) None
Void main()
{
int a=270;
char *p;
p=(char *)&a;
c1rscr();
printf("%d", *p);
getch();
}
(A) 200
(C) 14
(B) 16
(D) 15
Answer :
Prepared By:-
Mr. Pawar A. B.
111
1. C 2. D
3.D
4.B
5. C 6. D 7.C
8.A
9.A
10.C 11.D 12. B
13.B
14.C 15.A
16.B 17.D 18.B 19. C 20.A 21. B 22. A 23.C 24.B 25. D
26.D
27.C 28.D
29. B 30. D 31. A 32. B 33.C 34.A
35.D
36.A
37.C
38.B
39.D
40. C 41. A 42. C 43.B 44.D
45.A
46.D
47.C 48.A
49.C
50.C
1.
void main()
{
int a=5;
{
}
clrscr();
printf(%d a)
getch();
}
(A) 7
2.
B) 5
c) 8
D) 6
int a=5;
{
int a=7;
a++;
printf(%d a)
}
clrscr();
printf(%d a)
getch();
}
(A) 5
because the scope of variable int a=7 is close after a++ and printf stateme.
(B) 7
(C) 8
(D) None
3.
What is output?
void change(int const*p)
{
*((int *)p) = 20;
}
void main()
{
int const x=10;
change(&x);
clrscr();
printf("%d",x);
getch(); }
(A) 20
(B) 10
(C) 15
(D) 40
Prepared By:-
Mr. Pawar A. B.
112
What is output?
void main()
{
int a=1;
static int count;
clrscr();
count++;
while(a)
{
count++;
a&=a-l;
}
printf("%d",count);
getch();
}
(A) 20
(B) 1
(C) 16
(D) None
void main()
{
int array[]={1,2,3,4,5,6};
void xxx(int[5]);
xxx(arr);
getch();
}
void xxx(int ch[5])
{
clrscr();
printf("%d",1 [ch]);
}
(A) 20
(B)l
(C) 16
6.
find(int x, int y)
(D) None
{
retur((x<y):0:(xy));
}
call using find(x,find(x,y));
8.Expression 3*(y-8)/9 and (y-8/9)*3 yields same value and y is of integer then y
Must yield same value
(B) Must yield different value
(C) Mayor may not yield same value
(D) None
Prepared By:B.
Mr. Pawar A.
113
9.printf("%f,9/5)
will print
(A) 1.8
(B) 1.0
(C) 2.0
(D) None (Error)
10. What will Output of Following Program
if(a=7)
printf(a is 7)
else
printf(a is not 7)
(A)a is 7
(B) is not 7
(C )Nothing (D)Garbag
11. What will Output of Following Program
if(a>b)
if(b>c)
s1;
else
s2;
s2 will be executed if
(A) b>c
(B) a<=b
(C) b<=c and a<=b
(D) a>b and b<=c
12.
{
inc();inc();inc();
}
inc()
{
static int x;
printf("%d",++x);
}
(B) 3
(A) 012
(C) 123
(D) 111
13.
Preprocessing is done
(A)either before or at beginning of compilation process
Mr. Pawar A. B.
114
printf("%d" ,a ++ + b);
}
(A) results in syntax
(C)
(B) 8
(D) None
16.The process by which one bit pattern is converted in to another by bit wise operation
(A) Masking
(B) Pruning
(C) Bitting .
(D) Chopping
17.
Value of automatic variable that is declared but not initialized will be
(A) 0
(B) 1
(C) Unpredictable (D) None
18.
int v=3, *pv=&v; printf("%d%d",v, *pv);
output will
(B) 3 3
be
(A) Error
(D) 3 address ofv
(C) None
19.
declaration
enum
cities(Bethlehem,J ericho,N azareth =1,jeruslem}
assign value 1 to
(A) Bethlehm
(B) nazareth
(C) Bethlehem and nazareth
(D) Jerich() and nazareth
21.Consider scanf and sscanf function which is true
(A) no standard function called sscanf
(B) sscanf input character are taken from string
(C) sscanf is equivalent to scanf
23.
main ()
{
printf("%u" , main());
}
(A) prints starting address of main()
-----------------------------------------------------------a=4; **c=5;
Mr. Pawar A. B.
115
What is o/p
i =5;
i=(++i)/(i++);
printf("%d",i)
(A) 2
(C) 5
(B) 6 (D) 1
26. What is o/p
void main()
{
int const *p=5;
printf("%d",++(*p) );
}
(A) Compile time error
(C) Address
(D) 5
28.
main()
{
float me=1.1;
double you=1.1;
if(me==you)
printf("I LOVE YOU'):
else
printf(= : TE YOU)
(A) I LOVE YOU
(B) I HATE YOU
(C) Compile error
(D) Run time error
29.
main()
{
char *p;
printf("%d %d" ,sizeof(*p) ,si zeof(p));
}
What will be the output?
(A) 11
(C) 22
30.
main()
{
(B) 1 2
(1) Cannot tell
if(var)
main();
}
What will be the output?
(A) 1
(B) Will print 54321
(C) Compile error
(D) 5555555
Prepared By:-
Mr. Pawar A. B.
116
31.
main()
{
int i=3;
switch(i)
{
default: printf("zero");
case1: printf(obne)
break;
case 2: printf(''two'');
break;
case 3: printf("three'') ;
break;
}
What will be the output?
(A) Zero
(C) Three
(B) One
(D) Two
32.
main()
{
int c-=2;
printf("c=%d",c)
}
What will be the output?
(A) C = 2
(B) C=-2
(C) Garbage value
(D) Compile error
33.
#define int char
main()
{
int i=65;
printf("sizeof(i)=%d",sizeof(i) );
}
(A) Sizeof(i)=l
(B) Sizeof(i)=2
(D) Compile error
(C) Sizeof(i)=3
34.
main()
{
int i=10;
i=!i>14 ;
printf("%d" ,i) ;
}
(A) True
(C) 1
35.
(B) False
(D) 0
main()
Prepared By:-
Mr. Pawar A. B.
117
{
int i=64/squre( 4);
printf("%d",i);
}
What will be output of program?
(A) 16
(B) 64
(C) 4
(D) 32
36.
#include <stdio.h>
#define a 10
main()
{
#define a 50
printf("%d" ,a)
}
What will be output of program?
(A) 50
37.
main()
{
(B) 10
(C) 40
(D) 60
int i=10
printf("%d%d%d" ,a,++a,a++);
}
What will be output of program?
(A) 121211 (B) 121010
C) 111112
38.
(D) 101012
main()
{
int i=0;
for(;i<2;)
printf("%d ",i++);
}
What will be output of program?
(A) 0 1 2
(C) 1 2 3
39.
main()
{
int x;
(B) 0 1 2
(D) Compile error
for(x=1;x<=5;x++ );
printf("%d" ,x);
}
What will be output of program?
(A) 1 2 3 4 5
(B) 1
(C) 5
(D) 6
Prepared By:-
Mr. Pawar A. B.
118
40.
main()
{
int array[]={10,20,30,40};
printf("%d" ,sizeof( 5.2));
}
What will be output of program?
(A) 2
41.
main()
{
(B) 4
(C) 8
(D) 10
int array()={10,20,30,40};
printf("%d",- 2 [array ]);
}
What will be output of program?
(A)-60
42.
main()
{
(B)-30
int array[3]={5};
int i;
for(i=0;i<2;i ++)
printf("%d" ,array [i]);
}
int a=2;
a++;
b++;
}
printf("%d%d" ,a,b);
}
What will be output of program?
(A) 510
(C) 5 11
44.
{
(B) 611
(D) 6 10
main()
int x=2,y=3;
if(x+y<=5)
printf('True"} ;
else
Prepared By:-
Mr. Pawar A. B.
119
printf("False");
}
What will be output of program?
(A) True
(B) False
(C) Compilation Error
(D) Run time error
45.
main()
{
const int i=5;
i++;
printf{"%d" ,i);
}
What will be output of program?
(A) 5
(B) 6
(C) Compile Error
(D) Run time Error
1. B
11. D
21. B
31. C
41. B
1.
2. A 3. A 4. C 5. B 6. C 7. A
12. C
13. A
14. A
15. C
16. A
22. D
23. C
24. B
25. A
26. A
32. D
33. A
34. D
35. B
36. A
42. B
43. C
44. A
45. C
3.
4.
8. B 9. D 10. D
17. C
18. B
19. D
27. A
28. B
29. B
37. A
38. B
39. D
20. A
30. A
40. C
6.
In white box testing (A) Tester doesn't look into the internal behavior and functionality of system.
(B) Testing is done to dectde whether or not to accept the product.
(C) Tester accesses the internal data structure and algorithms
(D) Integration of external or third party system is tested
........ is done to eliminate errors of the application.
(A) Compilation
(B) Debugging
(C) Documentation
(D) All above
Prepared By:-
Mr. Pawar A. B.
120
(C) Testing
8.
9.
10.
(D) Documentation
(A) Testing
(B) Compilation
(C) Debugging
(D) All above
12.
(C) Simplicity
14.
(D) Robustness
(A) Failure
(B) Success
(C) Complete
(D) Partial
16.
(A) Route
(C) Sub path
17.
21.
data.
(B)'Black Box
(D) Yellow Box
(B) Path
(D) Gateway
Which testing methods are used by end-users who actually test software before they use it.
(A) Alpha and Beta Testing
(B) White Box Testing
(C) Black Box Testing
(D) Trial and Error Testing'
To test a function, the programmer has to write a_, which calls the function and passes it
test
(A) Stub
(C) Proxy
22.
(B) Driver
(D) None of the above
B.
Mr. Pawar A.
121
A regression test:
24.
25.
26.
(B) Will help ensure unchanged areas of the software have not been
(C) Will help ensure changed areas of the software have not been affected
(D) Can only be run during user acceptance testing
Verification is(A) Checking that we are building the right system.
(B) Checking that we are building the system right
(C) Performed by an independent test team
(D) Making sure that it is what the user really wants
The purpose of requirement phase is (A) To freeze requirements
(B) To understand user needs
(C) To define the scope of testing
(D) All of the above
. .. is the process of locating and correcting program errors
(A) Testing
(B) Executing
(C) Debugging
CD) None
27.
(A) Testing
(C) Both
28.
29.
(B) Debugging
(D) None
These errors occur when the values of programming language are not followed.
(A) Syntax Errors
(B) Run-time errors
(C) Compile Time Errors
(D) Logical errors
A program cannot be compiled and executed until these errors have been corrected
(A) Run-time errors
(B) Logical error
(C) None
30.
'" Errors typically involve _ incorrect punctuations, undefined term or misuse of terms.
(A) Compile-time Errors
(B) Syntax Errors
(D) None
(B) Logical errors
(D) All the above
33.
A program with ... errors can be compiled and executed but will produce wrong output .
(A) Run time errors
(B) Syntax errors
(C) Logical errors
(D) Compile time errors
34.
. . is are the errors which are detected and identified by the compiler and the execution of the
program cannot be completed until all errors are rectified.
(A) Syntax errors
(B) Logical errors
(C) Bugs
(D) Compile time errors
35.
'" Errors are the errors that the compiler missed during compile time.
(A) Run time errors
(B) Virus
(C) Compile time errors
(D) None
36.
These errors occur when a logical mistake has been taken place resulting in problem such as
in finite loops
(A) Bugs
(B) Compile time errors
(C) Syntax errors
(D) Run time errors
Prepared By:-
Mr. Pawar A. B.
122
.... Is the process of finding and reducing the no of bugs, or errors, in a computer program
thus making it behave as expected
(A) Debugging
(C) Compiling
38
(B) Testing
(D) Executing
(A) Assembler
(B) Interpreter
(c) Compiler (D) Debugger
39
... is the software tool which enables the programmer to monitor the execution of program,
stop it, start it, etc
(A) Debugger
(C) Compiler
(B) Loader
(D) Linker
40.
(A) Programmer
(B) Debugger
(C) Developer
(D) None
41.
... is the software tool which helps the programmer in following the step-by-step execution
program by allowing display of intermediate calculations and result whenever necessary.
of a
(B) None
43.
(D) Testing
45.
................ Is the process which involves ensuring that the final product matches the
requirements?
customer
(A) Testing
(C) Validation
(B) Debugging
(D) Verification
46.
............... is the process of ensuring that the product has been built matches all the
specification.
(A) Verification
47.
48.
object?
(A) White box testing
49.
(B) Validation
(C) Debugging
(D) Testing
In which of the testing internal behavior is not needed?
(A) White box testing
(B) Black box testing
(C) System testing
(D) Integration
Which of the testing involves feeding the input and observing the output from the test
(B) Black box testing
Prepared By:-
Mr. Pawar A. B.
123
50.
In which of the testing each unit of the software is tested to verity that the detailed design
the unit has been correctly implemented?
(A) Unit box testing
(B) Black box testing
(C) System testing
(D) Regression testing
for
ANSWERS
1. A 2. A 3. A 4. A 5. C
11. C
12. B
13. D
14. A
21. B
22. B
23. B
24. B
31. C
32. B
33. C
34. D
41. C
42. D
43. B
44. A
1.
6. B
15. A
25. D
35. A
45. C
7. C 8. A 9. B 10. C
16. C
17. A
18. D
19. B
26. C
27. C
28. A
29. D
36. D
37. A
38. D
39. A
46. B
47. B
48. B
49. D
20. A
30. B
40. B
50. A
3.
(A) Abacus
(C) Difference Engine
4.
(B) Clock
(D) None of these
(A) Powers
(C) Jacquard
6.
(B) Pascal
(A) Mechanical
(C) Electrical
7.
(B) Electro-mechanical
(D) None of these
(A) Processor
(B) Disk drive
(C) Printer
(D) Tape drive
8.
9.
What is the name of the latest Server Operating System developed by Microsoft?
(A) Windows NT
(B) Windows 2000
(C) Windows XP
(D) Windows 2003
What is the name of the software that allows us to browse through web pages called?
(A) Hardware
11.
(B) Software
(C) Process ID
12.
13.
(D) IP Address
Direct X is a __
(A) Computer Part
When you purchase a product over a Mobile Phone, the transaction is called
Prepared By:-
Mr. Pawar A. B.
124
(A) Files
(C) Floppies
16.
(B) e-Commerce
(C) CDROM
15.
(B) Directories
(D) Matter
(A) Mechanical
(C) Optical
17.
18.
(B) Electromechanical
(D) Fiber Optical
MTBF means
(A) Mean Time Before Failure
(B) Master Time Buffer Feature
(C) Most Treated Buffer Time
(D) Master Test Board Feature
Floppy Disk Drives were first introduced by which of the following computer manufacturers?
(A) IBM
(B) Sony
(C) Panasonic
(D) Compaq
19.
(A) Samsung
(B) IBM
(C) Fujitsu
(D) Segate
20.
Usually, in MSDOS, the primary hard disk drives has the drive letter
(A) A :
(C) C:
21.
(B) B :
(D)D :
(A) RAM
22.
(B) ROM
(B)DIMM
(D) DSMM
(B) OR
(D)NAT
The Analytical Engine developed during First Generation of computers used _ as a memory unit
(A) RAM
(C) Cards
26.
(A) AND
(C) NOT
25.
(D)HDD
(A) SIMM
(C) SDMM
24.
(C) FDD
(B) Floppies
(D) Counter Wheels
27.
(A) Capacitor
B.
(C)
Mr. Pawar A.
125
(D) Inductor
(A) Counter
30.
(B) Adder
(D) None of the above
(C) Register
Which of the following are the best units of data on an external storage device?
(A) Bits
(B) Bytes
31.
(C) Hertz
(D) Clock cycles
Seperate ReadlWrite heads are required in which of these memory access schemes.
34.
35.
(B) Loader
(D) Shift register
Which of the following are the cheapest memory devices in terms of Cost / Bit?
(A) Semiconductor Memories
(B) magnetic Disks
(C) Magnetic Tapes
(D) Compact Disks
Which of the following have the fastest access time?
(A) Semiconductor Memories
(B) Magnetic Disks
(C) Magnetic Tapes
(D) Compact Disks
__ is a semi conductor memory.
(A) Dynamic
(C) Bubble
36.
(B) Static
(D) Both A & B
(C) CDROM .
37.
38.
(A) Counter
(C) Adder
33.
interface consists of things --- like program counter, registers, interrupts and terminals
(A) Hardware
(B) Software
(C) Data
CD) None
40.
41.
Swapping
(A) Works best with many small partitions
(B) Allows many programs to use memory simultaneously to use the memory
(C) Allows each program in turn
(D) Does not work with overlaying
Poor response times are usually caused by
(A) Process busy
(B) High I/O rates
(A) Debugger
(C) Spooler
(B) Editor
(D) All above
43.
44.
A co-processor .
(A) Is relatively easy to support in software
(C) Works with any application
Page stealing
Prepared By:-
Mr. Pawar A. B.
126
(A) Fourth
(C) Sixth
46.
47.
48.
(B) Fifth
(D) Seventh
(D) *x = Ox200;
Answer:
1. D 2. D 3. A 4. C
11. D
12. B
13. C
21. A
22. B
23. D
31. D
32. D
33. D
41. D
42. C
43. A
5. D 6. B
14. B
15. A
24. D
25. D
34. A
35. D
44. B
45. B
7. A 8. B 9. A 10. B
16. C
17. A
18. A
19. D
26. C
27. B
28. B
29. C
36. C
37. A
38. B
39. A
46. D
47. D
48. A
49. B
20. C
30. B
40. C
50. D
1. ...... testing exposes defects in the interfaces and interactions between integrated components.
(A) White box testing
(B) System testing
(C) Regression testing
(D) Integration testing
2. In which of the testing, it tests a completely integrated system to verify that it meets its requirements?
(A) Unit testing
(B) Sanity box testing
(C) System Integration testing
(D) System testing
3.
..............testing verifies that a system is integrated to an external third party system defined in the
system requirements
(A) Black box testing
(B) White box testing
(C) System integration testing
(D) Unit testing
4. " ............. can begin in the early stages of software development.
(A) Testing
5.
(B) Debugging
(C) Documentation
(D) Compiling
(A) Testing
(B) Documentation
(C) Compiling
(D) Debugging
(A) Debugging
(B) Compiling
(C) Documentation
(D) Testing
7. ............... is said to be complete when all errors are known and have been fixed.
Prepared By:-
Mr. Pawar A. B.
127
(B) Testing
(C) Execution
(D) None
(A) Syntax
(B) Logical
(A) F4
(C) F6
(B) F5
(D) F7
(C) Warning
(D) None
(D) Header file
(B) Libraries
(B) Logical
(D) Warning
(A) Before
(B) After
(D) Never
Prepared By:-
Mr. Pawar A. B.
128
(A) Fourth
(B) First
(C) Second
(D) Third
28. API stands for .
(A) Application program interconnection
(C) Application program inter call
29. API contains.
(A) Routines
(B) Data structures
(D) None
(C) Objects
(A) Scanning
(B) Printing
(C) Debugging
(D) Deleting
(A) ANSI
(B) ASCII
(C) EBCDIC
(D) ISO
42. Which device is used as the standard pointing device in a Graphical User Environment
(A) Keyboard
(B) Joystick
(C) Mouse
(A) 2
(B) 10
(C) 16
(D) 32
(D) Laser
48. The programs which are as permanent as hardware and stored in ROM is known as
(A) Hardware
(B) Software
(C) Firmware
D) ROMware
Mr. Pawar A. B.
129
1. D
14.A
2. D 3.C
4.C
5.D
6. D 7. A
15. B
16. A
17. A 18. A
19.C
26. C
27. A
28.B 29.D
39.C 40. A 41. B
42. C
1.
2.
30. A
31. D
43.D
4.
7.
ALU is --------------
8.
(D) Mainframe
(C) 1.44MB
(D) 1.40 GB
38.A
50. D
12.
37. C
49.D
11.
36. D
48.C
10.
35. A
47. B
9.
34.D
46. D
33.C
45. D
Digital devices are ---------(A) Clock with a dial and two hands
(B) Digital clock
(C) Automobile speed meter
(D) All of them
The computer that process both analog & digital is called ----------
32. C
44.D
Pick the one that is used for logical operations or comparisons such as less than equal to or
greater than
(A) Arithmetic and Logic unit (B) Control unit
(C) Both A & B
(D) None
Analog computers work on the supply of ----------------(A) Continuous electrical pulses
(B) Electrical pulses but not continuous
8. D 9.D
10. A 11.D 12.D
13.B
20. B 21. D 22. D 23.A 24.C 25. A
Mr. Pawar A. B.
130
16.
BCD is ----------
17.
18.
(A) IBM-1401
(C) CDC-1604
19.
(B) EDSAC
(D) ICL 2900
Chief component of first generation computer was ----------(A) Vacuum Tubes & Valves
(B) Integrated Circuits
(C) Transistors
20.
FORTRAN is -----------
21.
(A) Fourth
(C) Third
24.
(B) Second
(D) First
Mr. Pawar A. B.
131
1. A 2. A 3. B 4. C 5. A 6. D 7. A
13. A 14. B
15. D
16. C
17. D
18. B
24. A 25. D
26. D
27. A
28. C
29. C
1.
8. A 9. B 10. D 11. C
12. B
19. A
20. C 21. A
22. B
23. C
3.
(A) Maintenance
5.
6.
(B) Testing
8.
(B) Comments
(C) Function description
Prepared By:-
Mr. Pawar A. B.
132
(D) Comments
12.
(A) Third
(C) Fourth
15.
(A) Safety
16.
17.
18.
19.
(B) Fifth
CD) Second
(B) Simplicity
(A) Readability
(B) Usability
(C) Productivity
Prepared By:-
Mr. Pawar A. B.
133
(A) Simplicity
(B) Natural
(C) Locality
W) Complexity
21.
(A) Opcode
(B) Data movement operations
(C) Instruction set
(D) None
22.
(A) C
(C) C++
23.
(B) JAVA
(D) None of these
In which of the following language a program can be written using symbolic names?
(A) Assembly language
(B) High-level language
(A) BASIC
(B) PASCAL
(C) FORTRAN
(D) All of the above
28.
PASCAL is a
29.
(A) C++
30.
(B) C+
(C) CPP
(D) .CCP
Fortran is
Mr. Pawar A. B.
134
The language that the computer can understand and execute is called
(A) Low-level machine language
language
(D) All A, B, C
34.
(A) FORTRAN
(B) C
(C) PASCAL
(D) All of the above
36.
(A) Assembler
(C) Interpreter
39.
40.
(B) Compiler
(D) Linker
A Linker
(A) 1.00E+15
(B) ADD AX
(C) X = X + Y (D)(SET! X Y)
42.
14
Mr. Pawar A. B.
135
43.
(C) Compiler
(D) Loader
45.
46.
47.
48.
1. A
2. A
3. C
4. D
5. B
6. D
7. A
8. D
9. B
10. A
11. B
12. C
13. C
14. B
15. D
16. C
17. A
18. D
19. D
20. C
21. D
22. D
23. B
24. A
25. C
26. B
27. D
28. C
29. C
30. D
31. C
32. A
33. D
34. B
35. D
36. C
37. A
38. D
39. A
40. D
41. B
42. A
43. C
44. C
45. D
46. C
47. B
48. B
49. B
50. D
Prepared By:-
Mr. Pawar A. B.
136
1.
Which statement(s) is used to terminate the current loop immediately and transfer control to
the statement immediately following that loop?
(A) Exit
(B) break
(C) Both exit & break
(A)Both
(C) Only 2
3.
(B) Only 1
(B) Sequential
(C)Jump
(D) Loop
4.
(A)Sequential
(B) Decision
(C) Iterative (D) All of above
5.
(A)Precise
(B) Unambiguous
(C)Precise & Unambiguous
(A) while
(C) for
7.
(B)do_while
(D) goto
(C) Terminal
(D) Pseudo code.
8.
Algorithm halts in
(B) Computing
(C)Linguistics
(D) All of above
10.
(A)Processing
(C) Terminal
11.
(B) Decision
(D) All above
Mr. Pawar A. B.
137
12.
(A) Flowchart
(B) Structure chart
steps
(D) None of above
15.
16.
(A)Decision
(B) End
17.
-------- Statement is used to indicate the end of a 'DO ... WHILE' construct in the pseudo code
(A) END DO
(C) END
18.
(C) Process
(D) None above
(B) DOEND
(D) CLOSE
(D) Effective
19.
English statements that follow a loosely defined syntax & are used to convey the design of
algorithm is called
an
Mr. Pawar A. B.
138
23.
(B) Flowchart
(C) Program
(D) Algorithm
24.
(A) 4
(C) 8
25.
(B) 6
(D) 7
(C) As a flowchart
(D) As a pseudo code
26.
27.
Consider the following statements and determine which of the following is correct?
(a) Indentation makes programs more readable and simpler to understand
(b) Indentation is compulsory while writing a program
(A) Only (a) is true
(B) Only (b) is true
(C) Both (a) & (b) are true
(D) Both (a) & (b) are false
The valid symbol(s) in flowchart is/are _
(A) Connector
(B) Terminal Symbol
(C) Processing Symbol
(A) A flowchart
(B) a program
(C) a process
(D) a pseudo code
29.
Mr. Pawar A. B.
139
Pointers
31.
(A) Finite
(C) short
32.
33.
(B) Infinite
(D) Long.
(B) Processing
(C) Input/output
(D) Terminal.
35.
The with arrowheads are used to indicate the flow of an operation, that is, the exact Sequence in
which the instructions are to be executed.
(B) Documentation
(C) Writing variable names
(D) Debugging
37.
(A) C
(B) LISP
(C) Machine Level Language
(D) JAVA
38.
(A) BASIC
(C) LISP
39.
(B) C
(D) JAVA
40.
Mr. Pawar A. B.
140
44.
45.
(C) Java
46.
47.
Which of the following is the easiest language to learn and use to write programs?
High level language
(B) Machine level language
(C) Assembly level language
(D) Middle level language
50.
Which of the following language is predecessor to C Programming Language?
(A)
(A)
(B) B
(C) C++
ANSWERS
1. B 2. B
(D) BCPL
3. D
4. D
5. C
6. D
7. D
8. A
9. B
10. A
Prepared By:-
B.
Mr. Pawar A.
141
11. A
12. D
13. C
14. C
15. A
16. B
17. A
18. C
19. C
20. D
21. A
22. D
23. A
24. B
25. A
26. A
27. D
28. C
29. D
30. C
31. A
32. A
33.C
34. B
35. A
36. C
37. C
38. B
39. A
40. C
41. A
42. C
43. B
44. A
45. D
46. D
47. C
48. C
49. A
50. B
1. :ow will you write comment in a C Program?
A. //
B. // //
C. /* */
D. /*
2. Which of the following is FALSE in C?
A. Keyword can be used as variable names
B. Variable names can contain a digit
C. Variable names do not contain a blank space
D. Capital letters can be used in variable names
3. =n C rithmetic instruction cannot contain
A. Variables
B. Constants
C. Variable names on right side of =
D. Constants on left side of =
4. An expression contains relational operators, assignment operators and arithmetic operators. In the
absence of parentheses, they will be evaluated in which of the following order
A. Assignment, Relational, Arithmetic
B. Assignment, Relational, Assignment
C. Relational, Arithmetic, Assignment
D. Assignment, Arithmetic, Relational
5. In b=6.6/a+2*n; which operation will be performed first?
A.
B.
C.
D.
6.6/a
a+2
2*n
A.
B.
C.
D.
Union
Pointer
String
Structure
A. %d, %f, %s
Prepared By:-
Mr. Pawar A. B.
142
B. %f, %d, %c
C. %d, %d, %c
D. %d, %f, %c
9. The general form of printf statement is
A. printf (\ format string \ list of variables )
B. print (\list of variables\ format sting)
C. printf (\format string list of variables \)
D. print (\ format sting \ list of variables )
10. The statement in C is terminated by
A. {
B. :
C. ,
D. None above
11. The general form of for statement in C is
A. for (initialize counter, increment, test counter)
B. for (increment counter; initialize counter; test counter)
C. for (test counter; increment counter; initialize counter)
D. for ( initialize counter; test counter; increment counter)
12. Difference between while and do-while
(A) \ 'while \ ' loop executes one or more times and \ 'do-while \' executes zero or more times (B)
Both \ 'while \ ' loop and \ 'do- while \' executes one or more times
(C) Both \ 'while \' loop and \ 'do-while \ ' executes zero or more times
(D) \ 'while \ ' loop executes zero or more times and \ 'do-while \' executes one or more times
13. To avoid the repetition of same code we are using.
(A) Array
(B) Function
(C) Function
(D) Structure
(D) 1
15. void main()
{
int a=12,b=12;
if(a=b)
printf("a and b are equal");
}
(A) 12
(B) Run time error
(C) Compile time error
Prepared By:-
Mr. Pawar A. B.
143
16. Every recursive version has an equivalent (but possibly more or less complex) iterative version, and
vice versa: validate this statement.
(A) It is true sometimes
(B) TRUE
(C) FALSE
(D) None of above
17. Which element of the array does the expression num*4+ references where num isa name of array?
(A)Forth
(B)Third
(C)Fifth
(D)First
18. In a ' C ' expression, how is a logical' AND ' represented?
(A) &
(B) II
(C) AND
(D) &&
19. How do you include a system header file called stdio.h in a ' C ' source file?
(A) #include<stdio.h>
(B) #incl \ "stdio.h \"
(C) #includefile<stdio>
(D) #include stdio.h
20. Which one of the following variable name is NOT a valid name?
(A)go_cart
(B)go4it
(C)4season
(D)run4
21. Which of the following shows the correct priority of arithmetic operators in ' C ' ? (Priority for
leftmost operator is highest and priority for the rightmost operator is lowest. Operators with equal
priority are separated with the word' or'
(C)65536
(D)128
25. The break statement is used to exit from?
Prepared By:-
Mr. Pawar A. B.
144
(A)case
(B)else---if
(C)switch
(D)if---else
27. The getch() function in' C' is_
(A) User defined function
(B) Library function
int z;
return z;
}
(A) 1
(B)
(C)3
(D)4
31. Which of the following statements are true for the following Program?
#include<stdio.h>
void mainO
{
for(i=l;i<=10;i++)
if(x!=y);
printf( \ "x=%dy=%d \" ,x,y);
}
Prepared By:-
Mr. Pawar A. B.
145
Prepared By:-
Mr. Pawar A. B.
146
(C)User defined
(D)empty
43. An end of a string is denoted by the ___ character.
(A)Enter key
(B)\\0
(C)\\ \ \
(D)/0
44. The syntax of the array declaration is:
(A)datatype nameofarray [size];
(B)nameofarray [size];
(C)datatype nameofarray ;
(D)all of above
45. A ' continue' statement is used
(A)To terminate a loop
(B)To continue a loop
(C)To continue a program
(D)None of these
46. If'a' is a variable defined in a 'C' program then &a denotes the __
(A)Content of a
(B )Address of a
(C)Both A and B
(D)None of these
47. Which of the following loops executes at least once, though it is not satisfying the condition?
(A)while loop
(B)do--while loop
(C)for loop
(Dhf-else
48. If int x = 2945, what is the value of the expression (xllOO)%lO?
(A)5 (B)9
(C)294
(D)0.5
49. If int x = 2945, what is the value of the expression x!10?
(A)5 (B)294
(C)294.5 (D)2
50. Hint x = 2945, what is the value
(A)294
(B)5
(C)294.5
(D)0.5
ANSWER
1. C 2. A 3. D 4. B 5. A 6. B
11. D
12. D
13. C
14. C
15. D
21. D
31. B
41. D
22. C
32. A
42. B
23. B
33. C
43. B
24. C
34. D
44. A
25. C
35. D
7. B 8. D 9. A 10. D
16. B
17. C
18. D
19. A
26. D
36. B
45. B
27. B
37. B
46. B
28. A
38. A
47. B
29. B
39. D
48. B
20. C
30. A
40. A
49. B
50. B
D. Flag value
Prepared By:-
Mr. Pawar A. B.
147
A. 0 and 2
B. 1 and -1
C. 0 and 1
D. 0 & 1 & 2
3. ROM is the ________
A. Volatile memory
B. Non-volatile memory
C. Virtual memory
D. None of above
4. RAM stands for__________
A. Read only memory
B. Random access memory
C. Recently Acquired memory
D. Read Ahead memory
5. Which of the following is not type of the printer?
A. Dot matrix printer
B. Laser printer
C. Drum printer
D. Scanner
6. Which of the following is not part of the computer?
A. Monitor
B. Hard disk
C. RAM
D. Printer
7. The operation included in the instruction set of a computer are _______
A. Logical
B. Arithmetic
C. Input-Output
D. All of above
8. The main memory is also called as the _________
A. Primary memory
B. Cache memory
C. Secondary memory
D. Auxiliary memory
9. What will be the hexadecimal equivalent of the binary number 1111
A. D
B. F
C. C
D. E
10. The difference between main memory and secondary storage is that the main memory is ______
and the secondary storage is ________
A. Temporary, permanent
Prepared By:-
Mr. Pawar A. B.
148
B. Permanent, temporary
C. Slow, fast
D. None of above
11. Secondary storage is also known as _________
A. Primary Memory
B. Ancillary Memory
C. An Auxiliary Memory
D. Read only Memory
12. What does IBM stands for?
A. Indian Business Machine
B. International Business Machine
C. Indian Business Model
D. International Business Model
13. CD-ROM is a ___________
A. Semiconductor memory
B. Optical memory
C. Magnetic memory
D. None of above
14. A logical system uses ________number system.
A. Binary
B. Decimal
C. Octal
D. Hexadecimal
15. Base of hexadecimal number system is.
A. 2
B. 8
C. 10
D. 16
16. How many nibbles a byte contains?
A. 2
B. 8
C. 4
D. 6
17. The 2s complement of 1000 is
A. 111
B. 10
C. 1000
D. 1
18. The condition is tested at the __________of loop in a while statement
A. Start
B. End
C. Middle
Prepared By:-
Mr. Pawar A. B.
149
D. Any Where
19. The arithmetic operations are carried out using __________.
A. Output Device
B. ALU
C. Memory Device
D. Timing and Control Unit
20. Base of octal number system is.
A. 2
B. 8
C. 10
D. 16
21. Which is the smallest unit of memory?
A. Byte
B. Nibble
C. Bit
D. Word
22. What is the octal equivalent of the decimal number 33?
A. 38
B. 39
C. 40
D. 41
23. Laptop are also known as ___________ Computers
A. Mainframe
B. Super
C. Notebook
D. Personal
24. After counting 0, 1, 10, 11, the next binary number is ________
A. 11
B. 100
C. 101
D. 111
25. The binary number system uses base of
A. 2
B. 8
C. 10
D. 16
26. How many bits a byte contains?
A. 2
B. 8
C. 4
D. 6
27. Which of the following is not a program planning tool?
Prepared By:-
Mr. Pawar A. B.
150
Flowchart
Structure chart
Pseudo codes
Loop
Prepared By:-
Mr. Pawar A. B.
151
C. Printer
D. Editor
36. Which of the following is an output device?
A. Monitor
B. Keyboard
C. Touch-screen
D. Mouse
37. Which technology is used in reading a Compact disk?
A. Mechanical
B. Electrical
C. Electro Magnetic
D. Optical
38. Which of the following have the fasted access time?
A. Semiconductor Memories
B. Magnetic Disks
C. Magnetic Tapes
D. Compact Disks
39. Which of the following is the smallest & fastest computer?
A. Super computer
B. Quantum computer
C. Micro computer
D. Mini computer
40. Primary memory stores __________
A. Input Data only
B. Instructions only
C. Output Data only
D. All of above
41. Which of the following device has a limitation that we can only read information from it but cannot
erase or modify it
A.
B.
C.
D.
Floppy Disk
Hard Disk
Tape Drive
CDROM
42. Which device can understand the difference between data and instructions?
A. Input device
B. Output device
C. Memory
D. Microprocessor
43. From a ________ we can only read the information. We cannot erase or modify the information
A. Floppy Disk
B. Hard Disk
C. Tape Drive
Prepared By:-
Mr. Pawar A. B.
152
D. CDROM
44. What is the other name for LAN card?
A. Network Interface Card
B. Network Connector
C. Modem
D. Internet Card
45. Which of the following storage device can store maximum amount of data?
A. Floppy Disk
B. Hard Disk
C. Compact Disk
D. DVD
46. Which of the following is the larger manufacturer of Hard Disk Drives?
A. IBM
B. Seagate
C. Microsoft
D. 3M
47. Which number system is usually followed in a typical 32-bit computer?
A. Binary
B. Decimal
C. Hexadecimal
D. Octal
48. Which of the following cables can transmit data at high speeds?
A. Coaxial cable
B. Fiber Optic Cable
C. Twisted pair Cable
D. UTP Cable
49. The program stored in ROM is known as ____________
A. Hardware
B. Software
C. Firmware
D. ROMware
50. The octal number system includes ________.
A. Only the digits 0 to 7
B. Only the digits 0 to 8
C. Only the digits 0 to 9
D. Only the digits 0 and 1
Answers
1.D
12.B
24.B
2.C
13.B
25.A
3.B
14.A
26.B
4.B
15.D
27.D
5.D
16.A
28.A
6.D
17.C
29.A
7.D
18.B
30.B
8.A
19.B
31.C
9.B
20.B
32.D
Prepared By:-
10.A
21.C
33.D
11.C
22.D
34.B
23.C
Mr. Pawar A. B.
153
36.A
47.B
37.D
48.B
38.A
49.C
39.B
50.A
40.D
41.D
42.D
44.A
45.B
Mr. Pawar A. B.
154
D. Process scheduler
9. Printout of contents of main memory and registers are taken in _____________
A. Debugging
B. Memory dump
C. Hand simulation of program code
D. Putting print statement in program code
10. When a key is pressed on the keyboard, which standard is used for converting the keystroke into the
corresponding bits
A.
B.
C.
D.
ANSI
ASCII
EBCDIC
ISO
Prepared By:-
Mr. Pawar A. B.
155
Prepared By:-
Mr. Pawar A. B.
156
B. Secondary memory
C. Hard disk
D. CD-ROM
26. Which of the following is a storage device?
A. Store room
B. Printer
C. CPU
D. Pen Drive
27. Find the odd man
A. CDROM
B. ROM
C. EPROM
D. PROM
28. Which of the following unit is used with computer system?
A. Gifabyte
B. Kilobyte
C. Megabyte
D. All of above
29. What will be the binary equivalent of hexadecimal number 8?
A. 10
B. 1000
C. 1110
D. 110
30. What of the following unit is not used to count the speed of a printer
A. Character Per Second
B. Dot Per Inches
C. Page Per Minute
D. All of above
31. Which device is used as the standard input device in a textual user interface?
A. Keyboard
B. Mouse
C. Joystick
D. Track ball
32. What will be the decimal equivalent of the binary number 10000
A. 32
B. 16
C. 8
D. 24
33. ALU is called the _________ of a computer.
A. Heart
B. Master Dispatcher
C. Primary Memory
Prepared By:-
Mr. Pawar A. B.
157
D. All
34. ____________ gives a computer its unique address across the network.
A. System Address
B. SYSID
C. Process ID
D. IP Address
35. Which of the following consortium looks for the standard representation of data in the Internet?
A. ISOC
B. W3C
C. IEEE
D. IETE
36. Which of the following is not just an output device?
A. Plotter
B. Printer
C. Flat Screen
D. Touch Screen
37. Which hardware was used by first generation computer?
A. Vacuum tubes
B. Transistor
C. VLSI
D. IC\s
38. Which of the following statement(s) is/are correct?
I. An algorithm consists of series of steps to be performed to solve a problem.
II. To a given problem there may be more than one algorithm.
A. I is correct
B. II is correct
C. I & II are correct
D. I & II are wrong
39. Base of decimal number system is _______.
A. 2
B. 8
C. 10
D. 16
40. Base of binary number system is ________.
A. 2
B. 8
C. 10
D. 16
41. What is the binary equivalent of decimal number 27?
A. 11101
B. 10111
C. 11011
Prepared By:-
Mr. Pawar A. B.
158
D. 11110
42. RAM(random access memory)is _______ memory
A. Not volatile
B. volatile
C. write only
D. All of above
43. Modern computers use _______
A. LSI /VLSI chip
B. Vacuum tubes
C. SSI chips
D. MSI chips
44. Primary storage is __________ as compared to secondary storage.
A. Allow and inexpensive
B. Fast and inexpensive
C. Fast but expensive
D. Slow and expensive
45. Which of the following statements are related to the machine language?
A. Difficult to learn
B. First generation language
C. Machine-dependent
D. All of above
46. Assembly languages consist of ________ instructions
A. Mnemonics
B. Opcodes
C. Operands
D. Fields
47. Pascal is a structured programming language, meaning that the flow of control is structured into
standard statements except Statement
A. if then else
B. for do
C. repeat Until
D. go to
48. _______ governs the sequencing of control through program
A. Control structure
B. Control program
C. Control time
D. All of above
49. What is the name of the software that allows us to view web pages?
A. Browser
B. Mail Client
C. FTP Client
D. Messenger
Prepared By:-
Mr. Pawar A. B.
159
Answers
1.B
13.A
25.A
37.A
49.A
2.A
14.C
26.D
38.C
50.D
3.D
15.A
27.A
39.C
4.A
16.D
28.D
40.A
5.A
17.A
29.B
41.C
6.C
18.D
30.B
42.B
7.D
19.B
31.A
43.A
8.C
20.B
32.B
44.C
9.B
21.D
33.A
45.D
10.B
22.A
34.D
46.A
11.B
23.A
35.B
47.D
12.B
24.A
36.D
48.A
1.
A.
B.
C.
D.
2.
A. %d
B. %dd
C. %ld
D. %if
3.
A.
B.
C.
D.
4.
A.
B.
C.
D.
5.
Scanf
Getch
Printf
Clrscr
A.
B.
C.
D.
6.
To break a loop
To give a comment
None
If a=3, b=0 and c=4, what is the value of the expression a && b || c
A.
B.
C.
D.
7.
To terminate a statement
1
2
3
4
Mr. Pawar A. B.
160
&&
||
|
&
A. =
B. &&
C. <>
D. +
Two way selection is implemented using the _______ statement.
9.
A.
B.
C.
D.
10.
A.
B.
C.
D.
If-else
for
switch
Nested if else
switch statement is used to make a decision __________________
To switch the processor to execute some other program
Between two alternatives
Amongst many alternaives
None of these
The _________ format specification is used to read or to write a Short integer variable.
11.
A.
B.
C.
D.
%c
%d
%hd
%f
A.
B.
C.
D.
B. Operator-operand
C. Operator-operand-operator
D. Operand-operator
15.
The sizeof operator tells us the size of a type or a primary expression in terms of number of __
.
A. Bytes
B. Bits
C. Nibbles
D. Words
16.
A. *
B. ||
Prepared By:-
Mr. Pawar A. B.
161
C. &
D. None above
17.
A.
B.
C.
D.
18.
Start
End
Middle
Start & End
variables are named area of ________ that is used to hold data
a.Memory location(s)
b.Row and column number on a monitor
c. Row and column number on a printer
19.
A. Beginning of loop
B. End of loop
C. End of program
D. Start of program
Which of the following control structures are used in the iteration logic-
20.
A.
B.
C.
D.
21.
if then if else
do while repeat Until
do & while
do while if else
D. All of above
Switch statement allows us to
22.
A.
B.
C.
D.
24.
A. Switch
B. Loop
C. Header file
D. Conditional statement
25.
=n the syntax while ( xxx ) xxx denotes
A.
Condition
B.
Statement
C.
Function
D.
Variable
26.
Out of the following ______ is a loop.
A. Switch
Prepared By:-
Mr. Pawar A. B.
162
B. While
C. Continue
D. Break
The condition in a loop should become _______ Sometime, otherwise loop would be executed
27.
28.
29.
A.
B.
C.
D.
30.
A.
B.
C.
D.
Semicolon
Full stop
Hyphen
Comma
31.
A.
B.
C.
D.
32.
A.
B.
C.
D.
33.
For
While
Case
If
While
Both A & C
for
do While
34.
A.
B.
C.
D.
Do while
While
For
=f Else
35.
A.
B.
C.
D.
Loop
Preprocessor
Preprocessor
Function
Prepared By:-
Mr. Pawar A. B.
163
Select valid function call for function void display() ,printf(:ellow World) -
36.
A. display()
B. Call display()
C. Display;
D. display();
37.
C. To call a function
D. Define a function
Any
38.
A.
B.
C.
D.
Int
Char
Float
Double
Answers
1.C
2.C
13.A
24.A
35.A
3.A
14.C
25.B
36.D
4.C
15.A
26.A
37.D
5.A
16.B
27.B
38.B
6.C
17.A
28.A
7.A
18.B
29.B
8.B
19.A
30.D
9.B
20.B
31.A
10.A
21.B
32.D
Prepared By:-
11.C
22.A
33.A
12.C
23.A
34.B
Mr. Pawar A. B.
164