wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

c program -basic

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

C language is developed by

a)

Tim Berners Lee

b)

Dennis Ritchi

c)

Bjarne Stroustrup

2.

Which is output function in C

a)

int

b)

%d

c)

scanf()

d)

printf()

3.

Which one is input function in C

a)

printf()

b)

scanf()

c)

int

d)

%d

4.

syntax of scanf() in C

a)

scanf("format specifier",variable);

b)

scanf("format specifier",&variable);

c)

scanf("format specifier,variable");

d)

scanf(format specifier,&"variable");

5.

syntax of printf() in C

a)

printf("%format specifier",&variable);

b)

printf("%format specifier",variable);

c)

'printf(%format specifier,"variable");

d)

printf("%format specifier,&variable");

6.

format specifier of int

a)

%i

b)

%c

c)

%d

d)

%b

7.

memory allocation of float

a)

1 byte

b)

2 byte

c)

4 byte

d)

8 byte

8.

relationl operator in C

a)

*

b)

=

c)

==

d)

?=

9.

What is the default state of an integer in c language?

a)

signed

b)

unsigned

c)

there is no default state

10.

#include<stdio.h>

int main()

{

int a=4,b,c;

b = --a;

c = a--;

printf("%d %d %d",a,b,c);

return 0;

}

a)

3 3 2

b)

2 3 2

c)

3 2 2

d)

2 3 3