Sample

Sample

University

20 Qs

quiz-placeholder

Similar activities

C - Strings

C - Strings

University

20 Qs

C Programming Quiz

C Programming Quiz

University

19 Qs

Fundamentals of data Structures & Linked list

Fundamentals of data Structures & Linked list

University

20 Qs

C-Py QUIZ | ROUND 1

C-Py QUIZ | ROUND 1

University

20 Qs

Coding club Summit Online Quiz

Coding club Summit Online Quiz

University

15 Qs

Programming Skills C/C++

Programming Skills C/C++

University

25 Qs

Technical Quiz

Technical Quiz

University

20 Qs

Programming Homework Questions

Programming Homework Questions

University

17 Qs

Sample

Sample

Assessment

Quiz

Computers

University

Hard

Created by

Gunjan Verma

Used 2+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What does the following declaration mean?

int (*ptr)[5];

ptr is a pointer to an array of 5 integers.
ptr is a pointer to an array of 10 integers.
ptr is a pointer to a single integer.
ptr is an array of 5 integers.

2.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which of the following can be checked in a switch statement?

Integer values

Character values

Both a and b

Floating-point values

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Identify the error in the code:

for (int i = 0; i < 5; i--) {

printf("%d", i);

}

Infinite loop

Syntax Error

i is undeclared

Logical error

4.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What is the correct syntax for declaring a function that does not return a value?

a) int func();

b) void func();

c) func();

d) function func();

5.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which type of variables can retain their values between function calls?

a) auto

b) register

c) static

d) extern

6.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which of the following is an incorrect function prototype?

a) int func(int a, int b);

b) float func(int, float);

c) double func(double);

d) int func(a, b);

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code?

int arr[] = {1, 2, 3, 4};

printf("%d", *(arr + 2));

a) 1

b) 2

c) 3

d) 4

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?