C Programming Quiz

C Programming Quiz

12th Grade

32 Qs

quiz-placeholder

Similar activities

Programação Orientada a Objetos - Introdução

Programação Orientada a Objetos - Introdução

1st Grade - Professional Development

30 Qs

L1TU7

L1TU7

6th Grade - Professional Development

30 Qs

KUIS SKD CPNSPEDIA SESI 1

KUIS SKD CPNSPEDIA SESI 1

12th Grade - Professional Development

30 Qs

CS Eval

CS Eval

9th - 12th Grade

27 Qs

8.1 Metal - Origins

8.1 Metal - Origins

7th - 12th Grade

32 Qs

Python 1-2 урок

Python 1-2 урок

5th Grade - University

30 Qs

Spawanie gazowe 311autogen

Spawanie gazowe 311autogen

9th - 12th Grade

35 Qs

L1TU6

L1TU6

6th Grade - University

30 Qs

C Programming Quiz

C Programming Quiz

Assessment

Quiz

Professional Development

12th Grade

Practice Problem

Hard

Created by

Shaik Imam

Used 22+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

32 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

}Which of the following is a correct way to concatenate two strings in C using macros?

#define CONCAT(a, b) a + b

#define CONCAT(a, b) a , b

#define CONCAT(a, b) a ## b

#define CONCAT(a, b) a || b

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What function is used to allocate memory dynamically in C?

malloc()

calloc()

realloc()

All of the above

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In dynamic memory allocation, what does the sizeof() operator determine?

Size of the allocated block

Size of the data type

Size of the pointer

Size of the structure

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you close a file in C after performing file operations?

fclose(file)

close(file)

closeFile(file)

file.close()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In C, the main function can take command line arguments. What is the prototype of such a main function?

int main(int argc , char *argv)

void main(int argc, char *argv[])

void main(char* args[])

int main(char* arguments)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access the second command line argument in C?

argv[1]

argv[2]

argc[1]

args[2]

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the memset() function do in C?

Copies memory block

Moves memory block

Sets memory block with a constant value

Allocates memory block

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Professional Development