Problem Solving Through Programming In C Quiz 1 Flashcard
Which of the following is a valid C variable name?
a) 2variable
b) variable_2
c) variable-2
d) variable.2
a) 2variable
b) variable_2
c) variable-2
d) variable.2
b) variable_2
Which of the following functions is used to read a single character from the keyboard in C?
a) scanf()
b) getchar()
a) scanf()
b) getchar()
b) getchar()
What is the purpose of the #include directive in a C program?
To include a library file.
Which of the following correctly describes the purpose of a compiler in C?
a) To execute the program line by line.
b) To convert source code into machine code.
a) To execute the program line by line.
b) To convert source code into machine code.
b) To convert source code into machine code.
Which of the following is true about the execution nature of C programs?
a) C programs are executed concurrently.
b) C programs are executed sequentially.
a) C programs are executed concurrently.
b) C programs are executed sequentially.
b) C programs are executed sequentially.
In C programming, what is the best way to comment multiple lines?
Enclosing the comments between /* and */.
Which of the following is a characteristic of the ASCII standard?
a) It is a 7-bit character encoding standard.
b) It uses 16-bit encoding for characters.
a) It is a 7-bit character encoding standard.
b) It uses 16-bit encoding for characters.
a) It is a 7-bit character encoding standard.
Which of the following statements is true regarding variable declaration in C?
a) Variables must be declared before they are used.
b) Variables are automatically initialized to zero.
a) Variables must be declared before they are used.
b) Variables are automatically initialized to zero.
a) Variables must be declared before they are used.
What type of device is computer webcam?
Input
Set of instructions to be provided to an electronic machine to perform a task is called
Programming
Which language does the computer understand?
Computer understands only Binary Language.
Which of the following is known as the language made up of binary-coded instructions?
a) High level
b) BASIC
c) Machine
a) High level
b) BASIC
c) Machine
c) Machine
What is algorithm in c?
A process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.
A 2D diagram to represent the steps to be followed to solve a problem is known as
Flow-chart
What is difference between flowchart and pseudocode?
Flowchart is basically a diagrammatic representation of the algorithm. Whereas in pseudo code normal English language is translated into the programming languages to be worked on.
The section of the CPU that selects, interprets and sees to the execution of program instructions is
Control Unit
The input given from keyboard is converted to computer understandable unit (bit) by the standard
ASCII
C is not a portable language: True or False
False
When we write X=Y in C, which of the following statements is valid?
a) X and Y both have same values but different locations.
b) X and Y both have same location and same values.
a) X and Y both have same values but different locations.
b) X and Y both have same location and same values.
a) X and Y both have same values but different locations.
The program which translates high level program into its equivalent machine language program is called :
a) a translator
b) a converter
a) a translator
b) a converter
a) a translator
An interpreter reads the source code of a program ______.
one line at a time
C Language developed at _______?
AT & T Bell Labs, USA
Also Available:
Problem Solving Through Programming In C Quiz 2