C Programming Lab Quiz

C Programming Lab Quiz

University

10 Qs

quiz-placeholder

Similar activities

C++ Quiz-1

C++ Quiz-1

University

15 Qs

DECISION MAKING IN C

DECISION MAKING IN C

University

10 Qs

Operators

Operators

University

12 Qs

Object Oriented Programming

Object Oriented Programming

University

10 Qs

C# mcqs-Unit I

C# mcqs-Unit I

University

10 Qs

PythonQuiz

PythonQuiz

University

9 Qs

METE280 Quiz#2

METE280 Quiz#2

University

15 Qs

C++ Identifiers and Constants Quiz

C++ Identifiers and Constants Quiz

University

10 Qs

C Programming Lab Quiz

C Programming Lab Quiz

Assessment

Quiz

Computers

University

Hard

Created by

Sridhar M

Used 2+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is commonly used in C to print debug information to the console?

scanf
fprintf
printf
puts

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the syntax for declaring a variable in C?

variable_name datatype;
variable_name datatype
datatype variable_name;
variable_name; datatype

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which C data type is used for storing single characters?

float
int
double
char

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the 'sizeof' operator in C return?

The memory address of its operand
The value of its operand
The data type of its operand
The size in bytes of its operand

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In C, which operator is used for getting the address of a variable?

*
#
$
&

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to compare two strings in C?

strcmp()
str_equal()
strcomp
compare()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which C library function is used to dynamically allocate memory?

malloc
realloc
free
calloc

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?