Programming For Problem Solving Unit 1 Multiple Choice Questions MCQ
Programming For Problem Solving Unit 1 Multiple Choice Questions MCQ
Programming For Problem Solving Unit 1 Multiple Choice Questions MCQ
Unit 1
3. For 16-bit compiler allowable range for integer constants is ______ ? [CLO 1] [PLO 2]
A. -3.4e38 to 3.4e38
B. -32767 to 32768
C. -32768 to 32767
D. -32668 to 32667
4. C programs are converted into machine language with the help of [CLO 1] [PLO 1]
A. An Editor
B. A compiler
C. An operating system
D. None of the above
5. A C variable cannot start with [CLO 1] [PLO 1]
A. An alphabet
B. A number
C. A special symbol other than underscore
D. both (b) and (c)
A. object code
B. machine code
C. source program
D. interactive programs
9. Data types are differed on the basis of [CLO 1] [PLO 1]
10. Loop statement which is repeated for some given number of times is classified as [CLO 1]
A. FOR loop
B. GO loop
C. REPEAT loop
D. GO REPEAT loop
11. Type of statement written in sequence and is repeated until the specific condition met is
classified as [CLO 1] [PLO 1]
A. format
B. loop
C. case
D. condition
A. programmer
B. program users
C. software
D. declared automatically
A. formula translator
B. formula translation
C. free translator
D. free translation
14. Functions that are used in the programs and are defined by the programmers are called
[CLO 1] [PLO 2]
A. program layout
B. program procedure
C. built-in functions
D. user-defined function
15. An assembler translates [CLO 1] [PLO 1]
16. Name given by a programmer to any particular data is classified as [CLO 1] [PLO 1]
A. identifier
B. identification
C. exponent
D. mantissa
17.When variable used in program is whole number, the variable is stored as [CLO 1] [PLO 2]
A. fixed string
B. integers
C. negative whole numbers
D. positive whole numbers
19. Variable which uses the same name in whole program and in its all routines thus best classified
as [CLO 1] [PLO 2]
A. middle variable
B. default variable
C. local variable
D. global variable
20. Statement which is used to make choice between two options and only option is to be performed
is written as [CLO 1] [PLO 2]
A. if statement
B. if else statement
C. then else statement
D. else one statement
21. The__________ statement is used to transfer the control to the end of statement block in a loop:
24. Which of the following is true for variable names in C? [CLO 1] [PLO 2]
a) They can contain alphanumeric characters as well as special characters
b) It is not an error to declare a variable to be one of the keywords(like goto, static)
c) Variable names cannot start with a digit
d) Variable can be of any length
25. The format identifier ‘%i’ is also used for _____ data type? [CLO 1] [PLO 2]
a) char
b) int
c) float
d) double
1. #include <stdio.h>
2. int main()
3. {
4. signed char chr;
5. chr = 128;
6. printf("%d\n", chr);
7. return 0;
8. }
a) 128
b) -128
c) Depends on the compiler
d) None of the mentioned
a) 10 b) 11
c) Compile time error d) 0
Explanation : j is not belongs to any data type
30. The keyword ‘break’ cannot be simply used within: [CLO 1] [PLO 3]
a) do-while b) if-else
c) for d) while
31. Which keyword is used to come out of a loop only for that iteration? [CLO 1] [PLO 3]
a) break b) continue
c) return d) none of the mentioned
32. The first step in problem solving is --------------- [CLO 1] [PLO 2]
a) Understand the problem c)Identify the problem
b) Developing algorithm/Flowchart d)Listing the possible outcome
33. The solutions which has series of actions to solve a problem are called ------ [CLO 1] [PLO 2]
a) Heuristic solutions
b) Algorithmic solutions
34. The solution can be reached by completing the actions in steps. These steps are called [CLO 1]
[PLO 2]
a) Sequence c)Algorithm
b) Flowchart d)Steps
35. Solutions that cannot be reached through a direct set of steps are called --------- [CLO 1][PLO 2]
a)Algorithmic solutions b) Heuristic solutions
36. ----------- means the outcome or the completed computer-assisted answer. [CLO 1][PLO 1]
a) Solution b) Result c) Program
37. The field of computer that deals with the problem of heuristic solution is called-----[CLO 1]
[PLO1]
a) Artificial Intelligence
b) Expert System c) Computer Management
38. ----------------- means the set of instructions that make up the solution after they have been coded
into a programming language. [CLO 1] [PLO1]
a) solution b) result c) program d) error
40. A language applied for wide range of application is called as ______language[CLO 1][PLO 2]
41. Compiler converts the source code into ______ [CLO 1][PLO 4]
a. C code b. Byte code c. Object code d. Executable code
42. ___________ converts source code to machine language one line at a time. [CLO 1][PLO 4]
a. Compiler b. Interpreter c. Assembler d.CPU
43. The program that converts high level language to a machine language is called __________
[CLO 1] [PLO 1]
a. Interpreter b. Linker c. Compiler d. Loader
45. A _______ is a notational system for describing computations in both machine and human
readable form [PLO 1] [CLO 1]
a. Programming language c.Machine language
b. High-level language d.Assembly language
46. ----------------- program converts assembly language into machine language [PLO 2] [CLO 1]
a. compiler b. interpreter c. assembler d. preprocessor directive
47. which symbol is been used for processing in flowchart? Ans: a [CLO 1] [PLO 3]
a) b) c) d)
48. which symbol is been used for input/output in flowchart? Ans: c [PLO 3] [CLO 1]
a) b) c) d)
49. which symbol is been used for decision making in flowchart? Ans: d [PLO 3] [CLO 1]
a) b) c) d)
a) b) c) d)
53.A character variable can store how many characters at a time? [PLO 2][CLO 1]
(a) 1 character
(b)8 characters
(c)255 character
54.Which of the following is the correct way of writing comments? [PLO 2] [CLO 1]
(a)*/comments/*
(b)/*comment*/
(c)**comment** (
d){comment}
56.The memory space taken for a char type data is [PLO 2] [CLO 1]
(a)2 bytes
(b)4 bytes
(c)8 bytes
(d)1bytes
57 .The memory space taken for a int type data is [PLO 2] [CLO 1]
(a) 2 bytes
(b) 4 bytes
(c) 8 bytes
(d)10bytes
58.The memory space taken for a float type data is [PLO 2] [CLO 1]
(a) 2 bytes
(b) 4 bytes
(c) 8 bytes
(d)10bytes
59. What is the only function all programs must contain ? [PLO 2] [CLO 1]
(a)start()
(b)system()
(c)main()
(d)program
60.For 16-bit compiler allowable range for integer constants is ________? [PLO 2] [CLO 1]
(a) -3.4e38 to 3.4e38
(b) -32767 to 32768
(c) -32668 to 32667
(d) -32768 to 32767
63.The memory space taken for a long int type data is [PLO 2] [CLO 1]
(a) 2 bytes
(b) 4 bytes
(c) 8 bytes
(d)10bytes
64. which of the following will not valid expressions in C? [PLO2] [CLO 1]
(a) a=2+(b=5);
(b) a=11%3
(c) a=b=c=5
(d) b+5=2