Search Header Logo

C Programming - Syntax and Variables Quiz

Authored by Sushma Sushma

Other

University

Used 1+ times

C Programming - Syntax and Variables Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

int x;

integer x;

num x;

var x;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What symbol is used to end a statement in C?

.

,

;

:

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to print output in C?

scanf()

cout

print()

printf()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you take input from the user in C?

input()

scanf()

gets()

cin

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid variable name in C?

1var

var_name

var-name

@var

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the keyword to define a float variable in C?

floating

real

float

decimal

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following line do? int a = 10;

Declares a float variable

Declares and initializes an integer

Assigns 10 to a float

None of the above

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?