C Programming

BASIC CONCEPTS IN PROGRAMMING MULTIPLE CHOICE QUESTIONS

1

Which data type is specifically used to store whole numbers without decimals?

A.

String

B.

Float

C.

Int

D.

Double

2

Which logical operator returns true only if both conditions being compared are true?

A.

OR (||)

B.

NOT (!)

C.

AND (&&)

D.

EQUAL (==)

3

What will be the result of the arithmetic expression 5 + 3 * 2 in most programming languages?

A.

16

B.

11

C.

13

D.

26

4

In most programming languages, statement ends with ......

A.

.

B.

;

C.

:

D.

!

5

Analyze the code caption below and select the value of c on the memory

int a = 20;
int b = 6;
int c = a%b;

A.

1

B.

2

C.

3

D.

4

6

Salary = Hours x Hourly Rate

A programmer wants to write a program to calculate the salary based on the hours entered by a worker.

Which of the following operators will he use to calculate the salary?

A.

*

B.

x

C.

&

D.

%