computer MCQs

12th • Chapter 08

50 Questions TextBook
1

The C programming language was developed in which year?

A
1969
B
1970
C
1972
D
1980
2

Who developed the C programming language?

A
Ken Thompson
B
Dennis Ritchie
C
Bjarne Stroustrup
D
James Gosling
3

C was developed at which laboratories?

A
Google Labs
B
IBM Watson Labs
C
AT & T Bell Laboratories
D
Microsoft Research
4

C was derived from which earlier programming language?

A
A
B
B
C
PASCAL
D
FORTRAN
5

The B language, which provided the basis for C, was developed by whom?

A
Dennis Ritchie
B
Niklaus Wirth
C
Ken Thompson
D
John McCarthy
6

A well-defined set of instructions given to the computer is called a?

A
Computer hardware
B
Computer file
C
Computer program
D
Computer algorithm
7

What does ANSI stand for?

A
American National Software Institute
B
American National Standards Institute
C
Associated National Standards Institute
D
American Nodal Standard Institute
8

What is the name of the Borland International's implementation of a compiler for C?

A
Visual C++
B
GCC
C
Clang
D
Turbo C++
9

What does IDE stand for?

A
Integrated Development Environment
B
Internal Drive Electronics
C
Initial Design Element
D
Intelligent Development Entity
10

In the Turbo C++ IDE, what is the key combination to open the File menu?

A
Alt+F
B
Ctrl+F
C
Shift+F
D
F1
11

Which option in the Turbo C++ IDE is used to create a new file?

A
File|Open
B
File|New
C
Edit|New
D
Project|New
12

What key is the shortcut for saving a program in Turbo C++?

A
F1
B
F2
C
F3
D
F5
13

What is the default extension assigned by Turbo C++ when saving a file?

A
.c
B
.h
C
.obj
D
.cpp
14

For a pure C program, what extension is suggested to be used when saving?

A
.cpp
B
.c
C
.h
D
.bak
15

The process of translating a source program into an object program is called?

A
Linking
B
Executing
C
Debugging
D
Compiling
16

What is the key combination to compile a program in Turbo C++?

A
Alt+F9
B
Ctrl+F9
C
Alt+F5
D
F2
17

A program written in a high-level language like C is called a?

A
Object Program
B
Executable Program
C
Source Program
D
Machine Program
18

A C compiler translates a source program into a file with what extension?

A
.exe
B
.bak
C
.obj
D
.c
19

Which program combines the object program with other necessary library files?

A
Compiler
B
Loader
C
Linker
D
Debugger
20

The linker produces a final executable file with which extension?

A
.obj
B
.lib
C
.exe
D
.c
21

Which program places the executable file into memory for execution?

A
Linker
B
Editor
C
Compiler
D
Loader
22

What is the key combination to execute (run) a program in Turbo C++?

A
Alt+F9
B
Ctrl+F9
C
Alt+F5
D
F9
23

To view the program's output screen in Turbo C++, what is the key combination?

A
Alt+F5
B
Ctrl+F5
C
Shift+F5
D
F10
24

Which menu is used to set the output and source directories in Turbo C++?

A
File
B
Edit
C
Debug
D
Options
25

Commands that give instructions to the C preprocessor are called?

A
Functions
B
Statements
C
Preprocessor Directives
D
Comments
26

A preprocessor directive always begins with which symbol?

A
&
B
$
C
/
D
#
27

The #include <stdio.h> directive gives the program access to which functions?

A
Standard mathematical functions
B
Standard input and output functions
C
String manipulation functions
D
Memory allocation functions
28

Which directive is used to define a constant macro?

A
#include
B
#define
C
#main
D
#const
29

In a C program, where does the execution begin?

A
preprocessor directive
B
first line of the file
C
main function
D
last line of the file
30

What encloses the body of a function in C?

A
Parentheses ()
B
Square Brackets []
C
Braces {}
D
Angle Brackets <>
31

The 'void' keyword before 'main' indicates that the function returns what?

A
An integer
B
A character
C
Nothing
D
A boolean value
32

What are the braces {} that indicate the beginning and end of a function body called?

A
Terminators
B
Separators
C
Delimiters
D
Brackets
33

Every statement in a C program must terminate with what?

A
A period (.)
B
A comma (,)
C
A colon (:)
D
A semicolon (;)
34

What is the process of finding and removing errors (bugs) from a program called?

A
Compiling
B
Linking
C
Executing
D
Debugging
35

Which type of error occurs when the program violates grammar rules of the C language?

A
Runtime Error
B
Logical Error
C
Syntax Error
D
System Error
36

Which type of error is detected by the compiler?

A
Syntax Error
B
Runtime Error
C
Logical Error
D
Human Error
37

Directing the computer to perform an illegal operation, like dividing by zero, causes what type of error?

A
Syntax Error
B
Logical Error
C
Compilation Error
D
Runtime Error
38

Which type of error occurs when a program follows a faulty algorithm?

A
Syntax Error
B
Runtime Error
C
Logical Error
D
Linker Error
39

Which type of error is the most difficult to detect?

A
Syntax Error
B
Runtime Error
C
Logical Error
D
Compiler Error
40

Which of the following is a low-level language?

A
C++
B
Java
C
Assembly Language
D
PASCAL
41

What is the native language of the computer, consisting of strings of 0s and 1s?

A
Assembly Language
B
Machine Language
C
High-Level Language
D
C Language
42

In assembly language, English-like words that replace machine language instructions are called?

A
Commands
B
Keywords
C
Mnemonics
D
Variables
43

What is the name for the set of grammar rules for writing programs in a high-level language?

A
Protocol
B
Syntax
C
Algorithm
D
Structure
44

High-level languages provide machine independence. What does this mean?

A
Programs run only on one machine
B
Programs need a specific processor
C
Programs can be executed on many different types of computers
D
Programs do not need a compiler
45

In the 'Hello World' example, which function was used to display output on the screen?

A
scanf
B
main
C
include
D
printf
46

The header file `math.h` contains information about what?

A
Input/Output functions
B
Common mathematical functions
C
File handling functions
D
Debugging tools
47

Which file is produced by the linker?

A
Source file
B
Object file
C
Executable file
D
Header file
48

The short-key for compiling a program is?

A
Ctrl+F9
B
Alt+F5
C
Alt+F9
D
F2
49

The B language was developed in which period?

A
1972
B
1980-81
C
1969-70
D
1990
50

What does a loader do?

A
It links library files
B
It places the executable file in memory
C
It translates the source code
D
It finds and removes errors