Sample

Sample

University

20 Qs

quiz-placeholder

Similar activities

EC8393_FDS_WEEKLY_TEST3(18.08.20)

EC8393_FDS_WEEKLY_TEST3(18.08.20)

University

20 Qs

c++

c++

University

22 Qs

A "C" Event-the backbone of modern coding.

A "C" Event-the backbone of modern coding.

University

16 Qs

2D Array and Strings in C

2D Array and Strings in C

University

16 Qs

EST102 : PROGRAMMING IN C TEST 1

EST102 : PROGRAMMING IN C TEST 1

University

20 Qs

PSC ALM QUIZ

PSC ALM QUIZ

University

16 Qs

QUIZ MASTERY SHOWDOWN 1ST YEAR SET 2

QUIZ MASTERY SHOWDOWN 1ST YEAR SET 2

University

15 Qs

Unit1-2nd Half

Unit1-2nd Half

University

20 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?