wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Foundation_Batch_2025

Total questions: 40

Worksheet time: 38mins

Name
Class
Date
1.

Who is the father of Computers?

a)

James Gosling

b)

Charles Babbage

c)

Dennis Ritchie

d)

Bjarne Stroustrup

2.

Which of the following is the correct abbreviation of COMPUTER?

a)

Commonly Occupied Machines Used in Technical and Educational Research

b)

Commonly Operated Machines Used in Technical and Environmental Research

c)

Commonly Oriented Machines Used in Technical and Educational Research

d)

Commonly Operated Machines Used in Technical and Educational Research

3.

What does the acronym RAM stand for in computing?

a)

Random Access Memory

b)

Read Access Memory

c)

Rapid Access Memory

d)

Run Access Memory

4.

Which programming language is known as the mother of all languages?

a)

Python

b)

C

c)

Java

d)

Assembly

5.

What is the primary function of an operating system?

a)

To manage hardware and software resources

b)

To compile programming code

c)

To provide internet connectivity

d)

To design user interfaces

6.

Which of the following language does the computer understand?

a)

Computer understands only C Language

b)

Computer understands only Assembly Language

c)

Computer understands only Binary Language

d)

Computer understands only BASIC

7.

What is the main purpose of a compiler?

a)

To convert high-level code to machine code

b)

To provide a user interface

c)

To manage system resources

d)

To execute code directly

8.

Actual instructions in flowcharting are represented in __________

a)

Circles

b)

Boxes

c)

Arrows

d)

Lines

9.

Who is the father of C language?

a)

Steve Jobs

b)

James Gosling

c)

Dennis Ritchie

d)

Rasmus Lerdorf

10.

What is #include <stdio.h>?

a)

Preprocessor directive

b)

Inclusion directive

c)

File inclusion directive

d)

None of the mentioned

11.
  1. #include <stdio.h>

  2. int main()

  3. {

  4. int y = 10000;

  5. int y = 34;

  6. printf("Hello World! %d\n", y);

  7. return 0;

  8. }

a)

Compile time error

b)

Hello World! 34

c)

Hello World! 1000

d)

Hello World! followed by a junk value

12.
  1. #include <stdio.h>

  2. int main()

  3. {

  4. int main = 3;

  5. printf("%d", main);

  6. return 0;

  7. }

a)

It will cause a compile-time error

b)

It will cause a run-time error

c)

It will run without any error and prints 3

d)

It will experience infinite looping

13.
  1. #include <stdio.h>

  2. void main()

  3. {

  4. int x = 5 * 9 / 3 + 9;

  5. printf("%d",x);

  6. }

a)

3.75

b)

Depends on compiler

c)

24

d)

3

14.

What is the purpose of the main function in a C program?

a)

To execute system commands

b)

To define the entry point of the program

c)

To declare global variables

d)

To include libraries

15.

Which of the following is a valid variable name in C?

a)

1stVariable

b)

first_variable

c)

first-variable

d)

first variable

16.

What does the acronym CPU stand for?

a)

Central Processing Unit

b)

Computer Personal Unit

c)

Centralized Processing Unit

d)

Computer Processing Unit

17.

What is the main purpose of an algorithm?

a)

To provide a step-by-step solution to a problem

b)

To store data efficiently

c)

To manage hardware resources

d)

To create user interfaces

18.

'\n' is used for

a)

New line

b)

Same line

c)

Both

d)

non of these

19.

The format identifier ‘%d’ is used for _____ data type.

a)

int

b)

char

c)

float

d)

double

20.

Which of the following is a characteristic of high-level programming languages?

a)

Machine dependent

b)

Human-readable

c)

Requires assembly

d)

Only for system programming

21.

What is the output of the following code snippet?
int a = 10; int b = 20; printf("%d", a + b);

a)

Compilation error

b)

10

c)

20

d)

30

22.

Which of the following data types can store decimal values in C?

a)

char

b)

int

c)

float

d)

string

23.

which function is used to display text in O/P window?

a)

print();

b)

printe();

c)

printf()

d)

printg();

24.

int x=176%10;

what is the value of x?

a)

1

b)

7

c)

6

d)

0

25.
  1. What is the out put of the following C code?

  2. #include <stdio.h>

  3. int main()

  4. {

  5. int i = -3;

  6. int k = i % 2;

  7. printf("%d\n", k);

  8. }

a)

Compile time error

b)

1

c)

-1

d)

None

26.

What will be the output of the following C code?

  1. int main()

  2. {

  3. int i = 3;

  4. int l = i / -2;

  5. int k = i % -2;

  6. printf("%d %d\n", l, k);

  7. return 0;

  8. }

a)

Compile time error

b)

-1 , 1

c)

1 , -1

d)

None of these

27.

What will be the output of the following C code?

  1. #include <stdio.h>

  2. int main()

  3. {

  4. int i = 5;

  5. i = i / 3;

  6. printf("%d\n", i);

  7. return 0;

  8. }

a)

Compilation Error

b)

1

c)

3

d)

2

28.

What will be the output of the following C code?

  1. #include <stdio.h>

  2. void main()

  3. {

  4. int y = 3;

  5. int x = 5 % 2 * 3 / 2;

  6. printf("Value of x is %d", x);

  7. }

a)

1

b)

2

c)

3

d)

4

29.

What will be the output of the following C code?

  1. #include <stdio.h>

  2. int main()

  3. {

  4. int a = 10;

  5. double b = 5.6;

  6. int c;

  7. c = a + b;

  8. printf("%d", c);

  9. }

a)

15

b)

15.6

c)

16

d)

16.6

30.

What will be the output of the following C code?

  1. #include <stdio.h>

  2. int main()

  3. {

  4. int a = 10, b = 5, c = 5;

  5. int d;

  6. d = a == (b + c);

  7. printf("%d", d);

  8. }

a)

1

b)

10

c)

5

d)

Compilation Error

31.

Which of the following is not a valid variable name declaration?

a)

int _a3;

b)

int _3a;

c)

int _A3;

d)

None of the mentioned

32.

To accept any input from the user we use ____?

a)

scand()

b)

scanf()

c)

scane()

d)

scang()

33.

What is the format specifier for printing a float value using printf()?

a)

%d

b)

%f

c)

%lf

d)

%c

34.

What does a diamond-shaped symbol represent in a flowchart??

a)

Input/Output

b)

Process

c)

Decision

d)

Connector

35.

Which symbol is used to represent the start or end in a flowchart?

a)

Rectangle

b)

Circle

c)

Oval

d)

Diamond

36.

What does the following flowchart do?

mathematica

CopyEdit

Start → Input A, B → Sum = A + B → Print Sum → End

a)

Finds product of A and B

b)

Finds Sum of A and B

c)

Finds mod of A and B

d)

None of these

37.

What does a rectangle represent in a flowchart?

a)

Input/Output

b)

Connector

c)

Process/Operation

d)

Decision

38.

Which component is NOT part of a flowchart?

a)

Input/Output

b)

Decision

c)

Data table

d)

Process

39.

Which is the correct syntax for using scanf() to input an integer?

a)

A) scanf("%d", a);

b)

scanf("%d", &a);

c)

scanf("%d", *a);

d)

scanf("%d", #a);

40.

What will happen in the following code?

int x;

scanf("%d", x);

a)

Input will be taken correctly

b)

Compilation error

c)

Runtime error or unexpected behavior

d)

It will store a float value