Machine-translated by Google. Questions are authored in English.
Top

Fundamentals Questions and Answers

1.

int main() {
    int x
    x = (1 + 2;
    return x;
}

Which of the following statements is true with respect to this source code in C language ?

Exam Year(s)

MH SET - 2025, SET Exam - 2025,

Answer: A

The code has a syntax error.

int x lacks the semicolon that ends a declaration, and x = (1 + 2; has an opening parenthesis with no closing one. Both break the grammar of C, so the compiler's parser rejects the program before it is ever linked or run.

A semantic error is grammatically valid code with a wrong meaning, such as a type mismatch. A linking error arises when a referenced function or variable cannot be found. A runtime error occurs while a compiled program runs. None can happen here because the code does not compile.

Please log in or register to report this question.

2.

C programs are converted into machine language with the help of

Exam Year(s)

Tripura Public Service Commission - 2019,

Answer: B

C programs are converted into machine language by a compiler.

A compiler translates the whole C source program into machine code (an object file), which the linker combines with library code into an executable.

An editor is only used to write and change the source text, and the operating system loads and runs the finished program; neither translates it. Since a compiler does, 'None of the above' is wrong.

Please log in or register to report this question.

3.

Which symbol is used for single-line comments in C ?

Exam Year(s)

Tripura Public Service Commission - 2026,

Answer: C

Single-line comments in C use //.

Everything after // up to the end of the line is ignored by the compiler. This style, borrowed from C++, became part of standard C in C99.

/* ... */ marks a multi-line (block) comment, which needs both an opening and a closing mark. # begins a preprocessor directive such as #include, and a single / is the division operator.

Please log in or register to report this question.

4.

C Language is a _________

Exam Year(s)

UGC NET - 2012,

Answer: D

C is called a middle level language (option D) because it combines the features of a high level language, such as functions and structured control, with low level features, such as pointers, bit operations and direct access to memory addresses.

It is not purely high level (A), since it gives machine-near control that languages like Java hide. It is not a low level language (B), since it is independent of machine instructions, and it is not machine language (C), which is binary code.

Please log in or register to report this question.

5.

If an integer needs two bytes of storage, then the maximum value of a signed integer is

Exam Year(s)

UGC NET - 2012,

Answer: B

The maximum signed integer in two bytes is \(2^{15} - 1\).

Two bytes are 16 bits. In two's complement the top bit is the sign, which leaves 15 bits for the value:

\[ \text{max} = 2^{15} - 1 = 32767 \]

\(2^{16} - 1\) is 65535, the largest unsigned value in two bytes. \(2^{16}\) and \(2^{15}\) are one more than the largest unsigned and signed values, so no 16-bit integer can reach them.

Please log in or register to report this question.

6.

Before a disk drive can access any sector record, a computer program has to provide the record’s disk address. What information does this address specify?

Answer: D

Correct answer: All of above

A disk address must identify the sector uniquely, and that takes all three coordinates: which surface (which platter and which side of it), which track on that surface, and which sector along the track. This is the classic cylinder-head-sector scheme.

Please log in or register to report this question.

7.

What are the three decision-making operations performed by the ALU of a computer?

Answer: D

Correct answer: All of the above

The ALU’s decision-making reduces to three comparisons: greater than, less than and equal to. Every conditional branch in every program is built from them, and the more elaborate tests are combinations - “not less than” being “greater than or equal to”.

Please log in or register to report this question.

8.

The word processing task associated with changing the appearance of a document is

Answer: C

Correct answer: Formatting

Formatting changes how a document looks - fonts, sizes, margins, alignment, spacing - without changing what it says. Editing changes the content itself. The distinction is what makes a style sheet possible: alter the appearance of a whole document without touching a word of it.

Please log in or register to report this question.

9.

Which is considered a direct entry input device?

Answer: D

Correct answer: All of the above

Direct entry means data enters the machine without being keyed. An optical scanner, a light pen, and a mouse or digitiser all qualify: each converts a physical action or image straight into machine-readable form. A keyboard, by contrast, is a keying device.

Please log in or register to report this question.

10.

A high quality CAD system uses the following for printing drawing and graphs

Answer: B

Correct answer: Digital plotter

A CAD drawing is made of lines, and a plotter draws them as lines - continuously, at large size and with high precision - rather than approximating them with a grid of dots. That is why plotters remained standard for engineering and architectural output long after dot-matrix and line printers had been displaced elsewhere.

Please log in or register to report this question.

Loading…
Tags: Fundamentals Questions and Answers || Fundamentals MCQ Questions and Answers || Fundamentals GK Questions and Answers || Fundamentals GK MCQ Questions || Fundamentals Multiple Choice Questions and Answers || Fundamentals GK || GK on Fundamentals || C Programming Questions and Answers || C Programming MCQ Questions and Answers || C Programming GK Questions and Answers || GK on C Programming