C Programming Quiz

C Programming Quiz

University

10 Qs

quiz-placeholder

Similar activities

NGP QUIZ 1

NGP QUIZ 1

University

15 Qs

Session 02: Variable - Data types - Operators

Session 02: Variable - Data types - Operators

University

14 Qs

Modelo Orientado a Objetos y UML

Modelo Orientado a Objetos y UML

University

10 Qs

Prueba diagnostica

Prueba diagnostica

University

9 Qs

Algorithms & Programming

Algorithms & Programming

6th Grade - University

7 Qs

Pre -Objetos C++

Pre -Objetos C++

University

5 Qs

Quiz sobre el ornitorrinco y la programación

Quiz sobre el ornitorrinco y la programación

8th Grade - University

15 Qs

Mail Merge

Mail Merge

10th Grade - University

12 Qs

C Programming Quiz

C Programming Quiz

Assessment

Quiz

Information Technology (IT)

University

Hard

Created by

Zemmary Batucan

Used 6+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to declare an integer variable in C?

int var;

integer var;

var int;

int_var;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the #include preprocessor directive do in C?

It includes the standard I/O library

It defines standard input-output functions

It starts the main function

It declares variables

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid comment in C?

// This is a comment

/* This is a comment */

Both a and c

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In C, the main() function:

Must always return an integer

It is optional

Can return any data type

Is executed at the end of the program

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following correctly declares a constant in C?

#define PI 3.14

const PI = 3.14

constant PI = 3.14

Both a) and b)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The correct syntax to print "Hello, World!" in C is:

printf("Hello, World!");

print("Hello, World!");

cout << "Hello, World!";

echo "Hello, World!";

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which header file must be included to use the printf() and scanf() functions?

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?