1.
“C” was primarily developed as a
Correct Answer
A. Systems Programing Language
Explanation
"C" was primarily developed as a systems programming language. This means that it was designed to be used for low-level programming tasks, such as operating systems development and hardware control. It provides low-level access to memory and hardware, making it suitable for tasks that require direct control over the computer's resources. While "C" can also be used for general-purpose programming, its origins and design make it particularly well-suited for systems programming. It is not specifically designed for data processing or any other specific purpose.
2.
“C” is a
Correct Answer
C. High Level Language with some low level features
Explanation
The given answer suggests that "C" is a high-level language with some low-level features. This means that while "C" primarily operates at a high level of abstraction, allowing for easier programming and readability, it also incorporates some low-level features that provide direct access to hardware and memory. These low-level features give programmers more control and efficiency when needed, making "C" a versatile language suitable for both high-level and low-level programming tasks.
3.
Most suitable option for “C” literal is
Correct Answer
B. A string constant
Explanation
The most suitable option for the "C" literal is a string constant. This is because a string constant is a sequence of characters enclosed in double quotation marks, which is the appropriate representation for the "C" literal. A string, on the other hand, refers to a data type that can hold a sequence of characters, but it does not specify that it is a constant value. A character and an alphabet are both individual characters, which do not match the requirement of representing the "C" literal.
4.
Length of the string “Correct” is
Correct Answer
A. 7
Explanation
The length of a string is determined by the number of characters it contains. In this case, the string "Correct" has 7 characters, so the correct answer is 7.
5.
Choose the correct statement
Correct Answer
D. All
Explanation
All of the given statements are correct. An identifier may start with an underscore, it may end with an underscore, and "IF" is a valid identifier.
6.
The “const” feature can be applied to
Correct Answer
D. All
Explanation
The "const" feature can be applied to all of the options listed: an identifier, an array, and an array argument. This means that you can use the "const" keyword to declare a constant identifier, a constant array, or a constant array argument in a function.
7.
Pick the operator that associate from the left
Correct Answer
D. All
Explanation
The correct answer is "All" because all the operators listed in the question (+ and ,) associate from the left. Associativity refers to the order in which operators of the same precedence are evaluated. Left associativity means that the operators are evaluated from left to right. In this case, both + and , operators follow left associativity, so "All" is the correct answer.
8.
Choose the correct statement
Correct Answer
D. All
Explanation
All of the statements given are correct. Constant expressions are indeed evaluated at compile time, meaning that their values are determined before the program is run. String constants can be concatenated at compile time, allowing for efficient string manipulation. The size of an array must be known at compile time, as the compiler needs this information to allocate the appropriate amount of memory for the array. Therefore, all of the statements are true.
9.
Pick the operator that associate from the right
Correct Answer
D. All
Explanation
The correct answer is "All." This means that all of the operators listed in the question associate from the right. Associativity refers to the order in which operators of the same precedence are evaluated in an expression. Operators that associate from the right are evaluated from right to left. Therefore, in this case, all the operators listed will be evaluated from right to left.
10.
Which of the following comments about the “++” operator are correct?
Correct Answer
D. All
Explanation
All of the given comments about the "++" operator are correct. The "++" operator is a unary operator, meaning it operates on a single operand. It is used to increment the value of a variable by 1. It can be applied to an expression, such as a variable or a constant. It associates from the right, which means that if there are multiple "++" operators in an expression, the rightmost one will be evaluated first.