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

Computer Languages Questions and Answers

1.

A set of finite rules to be followed in calculations or other problem-solving operations is known as ______

Exam Year(s)

DSSSB JE - 2023,

Answer: A

A finite set of rules or steps followed in a calculation or in solving a problem is called an algorithm. A flow-chart is only a diagram that shows an algorithm graphically, a function is a named block of code in a program that performs one task, and a procedure is a similar block of code that may not return a value. None of the three is the general definition of finite rules for solving a problem.

Please log in or register to report this question.

2.

What is the output of the following C code snippet?

int i=0;
for(i=1; i<10; i++);
printf("%d", i);

Exam Year(s)

DSSSB JE - 2023,

Answer: C

The for loop ends with a semicolon, so its body is empty. The loop starts with i = 1 and increments i until the condition i < 10 fails. It stops when i becomes 10, and the printf after the loop then prints 10. It is not 9, since the increment happens before the test fails, and it is not 0, because i was reset to 1 at the start of the loop. The code is valid C, so there is no syntax error.

Please log in or register to report this question.

3.

Which of the statement is TRUE with respect to Interpreter?

Exam Year(s)

MP Lab Technician - 2015,

Answer: A

The true statement is that an interpreter translates one instruction at a time.

An interpreter reads a program statement by statement, translating each into machine actions and executing it before moving to the next. If it meets an error it stops there. Python and BASIC are commonly interpreted.

Translating the whole program at once is what a compiler does, producing an object file that can be run again without translation. Because an interpreter keeps no translated copy, the program must be interpreted again every time it runs, so 'Repeated Interpretation is not necessary' is false. 'None of the above' is wrong because the first statement is true.

Please log in or register to report this question.

4.

Object Oriented Programming satisfies the criteria of

Exam Year(s)

MPPSC Forest Service - 2023,

Answer: D

Object oriented programming satisfies all of the above.

The main features of OOP are encapsulation (bundling data and the methods that act on it, and hiding internal details), inheritance (deriving new classes from existing ones), and polymorphism (one interface, such as a method name, behaving differently for different object types). Abstraction is usually listed as the fourth.

Since all three listed criteria are core OOP principles, choosing any single one would leave out the other two.

Please log in or register to report this question.

5.

COMAL language statement '//PROGRAM : Input three numbers and print average//' shows

Answer: C

Correct answer: a program remark

The line is enclosed in the double slashes that mark a comment, and its content is a note describing what the program does. It declares nothing and computes nothing, which is what distinguishes a remark from a function or a variable.

Please log in or register to report this question.

6.

ASCII codes has ____________ bits

Answer: A

Correct answer: 8

ASCII proper uses seven bits, giving 128 codes, but each is stored in a byte, and the extended sets that use the eighth bit are what most systems actually implement. Of the values offered, 8 is therefore the one intended; 16 bits belongs to Unicode's UTF-16.

Please log in or register to report this question.

7.

High level language includes

Answer: C

Correct answer: both (a) and (b)

COMAL and BASIC are both high level languages: each lets the programmer write in terms of the problem rather than of the machine, and each needs translating before it can run. Standard is not the name of a language.

Please log in or register to report this question.

9.

A program which translates high level program into machine code is classified as

Answer: A

Correct answer: compiler

A compiler translates a whole high level program into machine code before it is run. Translator is the general term covering compilers, interpreters and assemblers, so it is less precise than the answer the question wants.

Please log in or register to report this question.

Loading…
Tags: Computer Languages Questions and Answers || Computer Languages MCQ Questions and Answers || Computer Languages GK Questions and Answers || Computer Languages GK MCQ Questions || Computer Languages Multiple Choice Questions and Answers || Computer Languages GK || GK on Computer Languages || Computer Awareness Questions and Answers || Computer Awareness MCQ Questions and Answers || Computer Awareness GK Questions and Answers || GK on Computer Awareness