1.
How many main functions are in C program?
Correct Answer
C. 1
Explanation
A C program can only have one main function. The main function is the entry point of the program and is required for the program to execute. It is where the program starts and where the execution begins. Having more than one main function in a C program would result in a compilation error. Therefore, the correct answer is 1.
2.
Which keyword is not used in C language?
Correct Answer
B. Main
Explanation
The keyword "main" is used in C language to indicate the starting point of the program. It is a mandatory keyword and every C program must have a main function. Therefore, "main" is not the keyword that is not used in C language.
3.
How null character is shown in C language?
Correct Answer
C. \0
Explanation
In C language, the null character is represented by "\0". It is used to indicate the end of a string and is often used to initialize character arrays. This character has a value of zero and is different from the character '0'.
4.
C is _______level language?
Correct Answer
C. Middle level
Explanation
The correct answer is "Middle level". This is because a middle-level language combines features of both low-level and high-level languages. It provides a higher level of abstraction compared to low-level languages like assembly language, making it easier to write and understand code. However, it also allows for more direct control over hardware and memory compared to high-level languages, making it more efficient and suitable for systems programming. Therefore, C is considered a middle-level language.
5.
A statement is ended using which of the following?
Correct Answer
C. ;semicolon
Explanation
A statement is typically ended using a semicolon (;). A semicolon is used to separate two closely related independent clauses that could stand alone as separate sentences but are connected in meaning. It is an alternative to using a period to end a sentence. The other punctuation marks listed, such as comma, colon, and period, are used for different purposes in sentence structure.
6.
Range of integer in C ?
Correct Answer
C. -32768 to 32767
Explanation
The range of integers in C is from -32768 to 32767. This is because C uses a 16-bit representation for integers, where the most significant bit is reserved for the sign of the number. Therefore, the range of possible values is divided equally between positive and negative numbers, giving a range of -32768 to 32767.
7.
Printf( ) is output function ?
Correct Answer
A. True
Explanation
The given answer is true because the printf() function in programming is commonly used to display output on the screen. It is a standard library function in many programming languages, including C and C++. The printf() function allows the programmer to format and print data to the console or other output devices. Therefore, it is considered an output function.
8.
Blank space is called white space character in C language?
Correct Answer
A. True
Explanation
In the C language, a blank space is indeed referred to as a white space character. This term is used to describe any empty space, such as a space, tab, or newline, in a program's source code. These white space characters are typically ignored by the compiler and do not affect the program's execution. Therefore, the statement "Blank space is called white space character in C language" is true.
9.
Extension of header file in C is ______
Correct Answer
.h
Explanation
The extension of a header file in C is ".h". Header files in C typically contain function prototypes, type definitions, and macro definitions that are used by multiple source files in a program. Including a header file in a source file allows the source file to access the declarations and definitions present in the header file. The ".h" extension is a convention used to indicate that a file is a header file and should be included in C programs for proper compilation and linking.
10.
Integer data type has ____ bytes
Correct Answer
2
Explanation
The integer data type typically has a size of 2 bytes. This means that it can hold values ranging from -32,768 to 32,767 (assuming a signed integer). The size of an integer can vary depending on the programming language and the system architecture, but 2 bytes is a common size for many programming languages.