MCQ’s
Chapter 1 – Introduction To Programming

Introduction To Programming – MCQ’s

Choose the correct answer
1. A series of instructions given to the computer to solve any kind of problem is called:
a. Program
b. Operation
c. Computing
d. Process
2. Computer programs are also known as:
a. Software
b. Procedure
c. Algorithm
d. Computing
3. The process of feeding or storing instructions in the computer is known as:
a. Flowchart Designing
b. Computer Programming
c. Data Processing
d. Problem Solving
4. The person who knows how to write a computer program correctly is known as:
a. Programmer
b. Operator
c. Manager
d. Designer

» View More

5. C language was developed by____ between 1969 and 1973 at Bell Labs.
a. Von-Neumann
b. Bjarne Stroustrup
c. Charles Babbage
d. Dennis Ritchie
6. Which of the following is a C language IDE?
a. Visual Studio
b. Xcode
c. Code::Block
d. All
7. An IDE typically consists of:
a. Text editor
b. Compiler
c. Debugger
d. All
8. IDE stands for:
a. Integrated Digital Environment
b. Integrated Desktop Environment
c. Integrated Development Environment
d. Internal Disk Error
9. A ____ is a software that is used to write and edit computer programs.
a. Text Editor
b. Compiler
c. Debugger
d. Loader
a. Editor
10. C programs are converted into machine language with the help of:
a. Editor
b. Compiler
c. Debugger
d. Loader
11. The syntax errors in a program are checked by:
a. Compiler
b. Text Editor
c. Linker
d. Loader
12. A set of rules to write instructions in a programming language is known as:
a. Syntax
b. Semantic
c. Rules
d. Keywords
13. A ______occurs when the rules of the programming language are not followed.
a. Syntax error
b. Runtime error
c. Logical error
d. Program error
14. What is the name for the words that have predefined meaning and cannot be used as variable names?
a. Auto words
b. Reserved words
c. Restricted words
d Predefined words
15. Another name for keyword is:
a. Reserved word
b. Special words
c. Restricted word
d. Auto word
16. All keywords in C are written in:
a. Upper case
b. Title case
c. Lowercase
d. a or b
17. const, double and int are examples of:
a. Comments
b. Reserved Words
c. Header files
d. Identifiers
18. Which of the following is not a reserved word?
a. if
b. Float
c. goto
d. void
19. If a reserved word is used as variable name, it causes _____error.
a. Syntax
b. Logical
c. Runtime
d. Program
20. The place to write header files in C program is:
a. Top of the program
b. Bottom of the program
c. Middle of the program
d. Anywhere
21. C contains ____ header files.
a.5
b. 10
c. 15
d. Many
22. Header files in C contain:
a. Keywords
b. Library functions
c. Comments
d. Operators for files
23. stdio stands for:
a. Standard input output
b. Symbolic input output
c. Simple input output
d. String input output
24. The name of header file can be written between:
a. [ ] b. ( )
c. < >
d. << >>
25. The extension of the header file is:
a. .cpp
b. .txt
c. .c
d. .h
26. Which header file contains information about standard input/output functions?
a. stdio.h
b. math.h
c. time.h
d. string.h
27. Which of the following header file contains information about common mathematical functions?
a. stdio.h
b. math.h
C. conio.h
d. arith.h
28. The main () is a:
a. Header File
b. Comment
c. Function
d. Expression
29. Which of the following functions must be included in all C programs?
a. start()
b. system()
c. main()
d. program()
30. Which of the following is used to indicate the start and end of main() function body?
a. { and }
b. ( and )
c. BEG and END
d. -> and <-
31. For every opening brace in a C program, there must be a:
c. Closing brace
b. Comma
c. Colon
d. Period
32. C statement ends with a:
a. Period (.)
b. Comma (,)
c. Semicolon (;)
d. Slash (/)
33. ______ are the statements that are ignored by the compiler and are not executed.
a. Comments
b. Header files
c. Variables
d. Functions
34. The place to write comments in C program is:
a. Top of the program
b. Bottom of the program
c. Middle of the program
d. Anywhere
35. In C language, anything after // on the same line is considered as:
a. Header File
b. Comment
c. Keywords
d. Variable
36. Single line comment in C language start with:
a. #
b. //
c. *\
d. /*
37. Multiline comments in C language end with:
a. #
b. //
c.*\
d. */
38. In C language, the comments can be written in a program between:
a. { }
b./* */
c. |* *|
d. < >
39. Which of the following is correct comment in C language?
a. //comment
b. /* comment */
c. | *comment* |
d. both a and b
40. A quantity whose value cannot be changed during program execution is called:
a. Constant
b. Variable
c. Keyword
d. Address
41. In C, ______ are the values that include a decimal point.
a. Integer Constants
b. Real Constants
c. Character Constants
d. String Constants
42. In C, ______ are the values without a decimal point.
a. Integer Constants
b. Real Constants
c. Character Constants
d. String Constants
43. _____is a single alphabet, digit or special symbol enclosed within single quotes.
a. Integer Constants
b. Real Constants
c. Character Constants
d. String Constants
44. In C, character constants are written within:
a. Double quotes (“)
b. Single quotes (‘)
c. Exclamation points (!)
d. Pound signs (#)
45. Which of the following is a valid example of character constant?
a. ‘A’
b. ‘9’
c. ‘$’
d. All
46. A location in computer memory with some data that can be changed is called:
a. Constant
b. Variable
c. Keyword
d. Address
47. Variables are created in:
a. RAM
b. ROM
c. Hard disk
d. USB
48. The data type int stores:
a. Whole numbers
b. Numbers with fraction part
c. Comments
d. Strings
49. Data type int takes______ bytes.
a. 10
b. 6
c.4
d. 16
50. Which of the following is used to declare variables that can hold real numbers?
a int
b. float
c. real
d. char
51. The number of bytes used by float data type in C is:
a. 2
b.4
c. 12
d. 16
52. char is used to declare a variable type of:
a. Integer
b. Character
c. Real
d. Float
53. The number of bytes used by char data type in C is:
a. 2
b. 1
c. 12
d. 16
54. Which of the following is not a valid data type in C?
a. float
b. int
c. real
d. char
55. Variable names cannot begin with:
a. Number
b. Underscore
c. Upper-case letter
d. Lower-case letter
56. The variable names cannot contain:
a. Digits
b. Underscore
c. Alphabets
d. Period
57. Which of the following is an invalid variable name?
a._cust_num
b. jan 2009
c. dayOfWeek
d. 2dGraph
58. Which of the following is valid variable name?
a. points_scored
b. my var
c. $cost
d. case

59. Which of the following is required to declare a variable?
a. Comment
b. Variable name
c. Data type
d. Both b & c
60. Which symbol is used to separate each variable while declaring many variables in one statement?
a. Commas(,)
b. Colons(:)
c. Semicolons(;)
d. pipes{|)

61. Which of the following is an invalid statement for variable declaration?
a. unsigned int marks:
b. Int a, b, c;
c. float salary:
d. char x; y; z;

62. Which of the following C declaration statement is invalid?
a. int points_scored;
b. char grade;
c. float height;
d. real area;

 

Answers
5.d 4.a 3.b 2.a 1.a
10.b 9.a 8.c 7.d 6.d
15.a 14.b 13.a 12.a 11.a
20.a 19.a 18.b 17.b 16.c
25.d 24.c 23.a 22.b 21.d
30.a 29.c 28.c 27.b 26.a
35.b 34.d 33.a 32.c 31.a
40.a 39.d 38.b 37.d 36.b
45.d 44.b 43.c 42.a 41.b
50.b 49.c 48.a 47.a 46.b
55.a 54.c 53.b 52.b 51.b
60.a 59.d 58.a 57.d 56.d
62.d 61.d

 

 

» View Less

Useful? Share with your friends.

Leave a Reply