1.
C language has been developed by ?
Correct Answer
B. Dennis Ritchie
Explanation
Dennis Ritchie is the correct answer because he is widely recognized as the creator of the C programming language. Along with Ken Thompson, Ritchie developed C at Bell Labs in the early 1970s. C became popular due to its simplicity, efficiency, and ability to work closely with hardware, making it a foundational language for operating systems and low-level programming. Ritchie's contributions to C and other programming languages have had a significant impact on the field of computer science.
2.
C can be used on ?
Correct Answer
D. All of the above
Explanation
C can be used on all of the above operating systems, including MS-DOS, Linux, and Windows. C is a widely used programming language that is platform-independent, meaning it can be compiled and executed on different operating systems. Therefore, it is not limited to any specific operating system and can be used on all of the mentioned platforms.
3.
C programs are convrted into the machine language with the help of ?
Correct Answer
B. Compiler
Explanation
C programs are converted into machine language with the help of a compiler. A compiler is a software tool that translates the high-level code written in C language into low-level machine code that can be directly executed by the computer's hardware. It performs various tasks such as lexical analysis, syntax analysis, semantic analysis, code optimization, and code generation to produce an executable program. Therefore, a compiler is the correct answer for converting C programs into machine language.
4.
The real constant in C can be expressed which of the following forms ?
Correct Answer
D. Both Fractional and Exponetial
Explanation
The real constant in C can be expressed in both fractional and exponential forms. The fractional form represents a real number as a fraction, while the exponential form represents a real number as a base raised to an exponent. Both forms allow for the representation of real constants in C.
5.
A character variable can at a time score ?
Correct Answer
A. 1 character
Explanation
A character variable can only store one character at a time. This means that it can hold a single character value such as a letter, number, or symbol. It cannot store multiple characters or a string of characters. Therefore, the correct answer is 1 character.
6.
The statement char ch='z' would store in ch
Correct Answer
B. ASCII value of Z
Explanation
The statement char ch='z' would store the ASCII value of the character 'z' in the variable ch. In ASCII, the character 'z' has a decimal value of 122. Therefore, the correct answer is the ASCII value of Z.
7.
Which of the following is not a character constant ?
Correct Answer
D. All of the above
8.
The maximun value that an integer constant can have is ?
Correct Answer
B. 32767
Explanation
The given answer, 32767, is the maximum value that an integer constant can have. This is because the range of a signed integer in most programming languages is typically from -32768 to 32767. Therefore, 32767 is the highest positive value that can be represented by an integer constant.
9.
A C variable cannot start with ?
Correct Answer
D. Both (2) and (3)
Explanation
A C variable cannot start with a number or a special symbol other than an underscore. According to the C programming language rules, a variable name must start with an alphabet or an underscore, followed by any combination of alphabets, numbers, or underscores. Therefore, both options (2) and (3) are correct, as a C variable cannot start with a number or a special symbol other than an underscore.
10.
Which of the following statements is wrong ?
Correct Answer
D. Count+5=res;
Explanation
The statement "count+5=res;" is wrong because it tries to assign a value to a variable "res" using an equation that includes the variable "count" and the number 5. However, the variable "count" has not been declared or assigned a value before this statement, so it is not possible to perform this assignment.