C Programming Quiz

C Programming Quiz

University

10 Qs

quiz-placeholder

Similar activities

Introduction To Programming - Lesson Exception Handling

Introduction To Programming - Lesson Exception Handling

11th Grade - University

13 Qs

Intro to JS: Functions, Scope & Objects

Intro to JS: Functions, Scope & Objects

11th Grade - University

8 Qs

Structured Programming

Structured Programming

University

11 Qs

CMDP2063 Unix and C Programming

CMDP2063 Unix and C Programming

University

15 Qs

Cuestionario sobre tkinter y Tcl/Tk

Cuestionario sobre tkinter y Tcl/Tk

University

15 Qs

Lecture 4 - Django Templates

Lecture 4 - Django Templates

University

15 Qs

Fundamentals of C Programming

Fundamentals of C Programming

University

10 Qs

Pre-Orientada a objetos

Pre-Orientada a objetos

University

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