wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

C BASICS

Total questions: 30

Worksheet time: 29mins

Name
Class
Date
1.

int main ()


{


int x = 24, y = 39, z = 45;


z = x + y;


y = z - y;


x = z - y;


printf ("n%d %d %d", x, y, z);


}

a)

24 39 63

b)

39 24 63

c)

24 39 45

d)

39 24 45

2.

Who is Father of C Language

a)

Bjarne Stroustrup

b)

James A. Gosling

c)

Dennis Ritchie

d)

Dr. E.F. Codd

3.

C Language is developed at ___________?

a)

AT & T's Bell Laboratories of USA in 1972

b)

AT & T's Bell Laboratories of USA in 1970

c)

Sun Microsystems in 1973

d)

Cambridge University in 1972

4.

C programs are converted into machine language with the help of

a)

An Editor

b)

A compiler

c)

An operating system

d)

None of these.

5.

Which one of the following is not a valid identifier?

a)

_examveda

b)

1examveda

c)

exam_veda

d)

examveda1

6.

Which is the only function all C programs must contain?

a)

start()

b)

system()

c)

printf()

d)

main()

7.

Which of the following is not a correct variable type?

a)

float

b)

real

c)

int

d)

char

8.
What punctuation is used to indicate the beginning and end of code blocks?
a)
{ }
b)
-> <-
c)
BEGIN and END
d)
( and )
9.
How will you print \n on the screen?
a)
printf("\n");
b)
echo "\\n";
c)
printf('\n');
d)
printf("\\n");
10.
Which of the following is the correct operator to compare two variables?
a)
:=
b)
=
c)
equal
d)
==
11.
Which symbol terminates a C statement?
a)
.
b)
;
c)
,
d)
}
12.
How to comment in C language?
a)
//Comment
b)
A & B
c)
* Comment *
d)
<---Comment---->
13.

Program is a list of_______________, written in a _______________________ to determines the behaviour of a machine.

a)

word, english

b)

instructions , programming language

c)

instructions, word

14.

A flowchart is a graphical representation that helps programmer to develop algorithms in programming.

a)

True

b)

False

15.

Process of writing the C source code is called as ___________________

a)

Editing

b)

LInking

c)

Executing

16.

#include<stdio.h> is important line in c. The stdio.h contains information on input output routines.

a)

True

b)

False

17.
Transforming actions into a symbolic language
a)
Program
b)
Coding
c)
Programming
d)
Debugging
18.

The operator "&" is used for

a)

Bitwise AND

b)

Bitwise OR

c)

Logical AND

d)

Logical OR

19.

The size of a character variable in C is

a)

8 bytes

b)

4 bytes

c)

2 bytes

d)

1 byte

20.

When C Language was invented?

a)

1970

b)

1978

c)

1979

d)

1972

21.

___ is used to translate source code instructions into the appropriate machine language instructions

a)

Module

b)

Library routine

c)

Compiler

d)

Preprocessor directives

22.

A ____ is a set of instructions that the computer follows to solve a problem.

a)

Comipler

b)

Linker

c)

Program

d)

Operator

23.

The program written by the programmer with high level language is called:

a)

Object Code

b)

Syntax

c)

Source Code

d)

Runtime Library

24.

What is the extension of C program source code?

a)

.cpp

b)

.py

c)

.c

d)

.java

25.

What is machine language?

a)

A language used by car

b)

Machine language is made of 1's and 0's

c)

Machine language is made of 7's and 8's

d)

A language that only understands plain English

26.

Which of the following is not a high level programming language?

a)

Assembly

b)

C++

c)

Java

d)

Python

27.

Every C Program Statement must be terminated with a

a)

.

b)

#

c)

;

d)

!

28.

The words if, else, auto, float etc. have predefined meaning and users cannot use them as variables.


These words are called

a)

keywords

b)

identifier

c)

data types

d)

constant

29.

C language is a

a)

structured program

b)

object oriented program

c)

oriented program

d)

basic program

30.

What function is use to display a message?

a)

printf

b)

print

c)

output