wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Getting Started in C Programming

Total questions: 20

Worksheet time: 14mins

Name
Class
Date
1.

Which of the following is a correct C programming statement?

a)

printf(“Programming”)

b)

int num2=3

c)

scanf(“&num”, %d);

d)

printf(“ “);

2.

Which of the following is a correct syntax of printf?

a)

printf( strings );

b)

Printf(“Strings”);

c)

printf(“ strings “);

d)

None of these

3.

C programming is a case-sensitive?

a)

True

b)

False

4.

The format specifier/placeholder (a)   is used to print integers.

5.

The format specifier/placeholder (a)   is used to print floating points.

6.

The format specifier/placeholder (a)   is to used to print single character.

7.

The format specifier/placeholder (a)   is used to print string.

8.

The symbol (a)   is used to terminate the C statement .

9.

The symbol (a)   is used to address a variable.

10.

The escape sequence (a)   is used to create a new line.

11.

The escape sequence (a)   is used to create a horizontal tab.

12.

Which of the following variable declaration is correct?

a)

char char;

b)

int void;

c)

float _a;

d)

Float a=0;

13.

Given the code above, what is the expected output?

a)

Null

b)

Compilation Error

c)

“ “

d)

0

14.

Given the code above, what is the expected output?

a)

Syntax Error

b)

Null

c)

The value of a = -10

d)

Compilation Error

15.

Given the code above, Assumed that 5 was entered , what is the expected output?

a)

Enter a value of a: 5

You entered the value of a: 5

b)

Compilation error

c)

nothing

d)

Run time error

16.

Given the code above, assumed that HELLO was entered, what is the expected output?

a)

HELLO

b)

Compilation Error

c)

H

d)

Syntax Error

17.

The arithmetic (a)   operator is to get the remainder of an integer.

18.

The arithmetic (a)   operator is used to add the variable value or to the operand.

19.

The arithmetic (a)   operator is used to subtract the value of the variable or to the operand.

20.

What is stdio stands for? (a)