C Language

C Language

University

32 Qs

quiz-placeholder

Similar activities

Vaccine Preventable Diseases & Viral Exanthems

Vaccine Preventable Diseases & Viral Exanthems

University

28 Qs

Corporate Accounting - Formation of Company

Corporate Accounting - Formation of Company

University

27 Qs

CNXHKH - Tuần 3

CNXHKH - Tuần 3

University

27 Qs

CARDIOLOGIA

CARDIOLOGIA

University

27 Qs

Generalidades Psiquiatría

Generalidades Psiquiatría

University

27 Qs

FR -IAS 1, 20, 40, 23 & 3

FR -IAS 1, 20, 40, 23 & 3

University

27 Qs

How well do you know jungkook?

How well do you know jungkook?

KG - Professional Development

27 Qs

Test

Test

University

27 Qs

C Language

C Language

Assessment

Quiz

Other

University

Practice Problem

Medium

Created by

Aymane Benhima

Used 1+ 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

What information would an error message probably not supply.

A corrected line of code.

The line number of the error.

The file the error occured in.

A description of the error.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given a code file calld main.c, which command would compile the code into an executable named main.

gcc main.c main

gcc main.c

gcc main.c -o main

gcc main -o main.c

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid declaration for a variable in C?

int 1example;

int example value;

int example;

int goto;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

True or False: variables in C can be initialized with values only at their declaration.

True, variables must be set at declaration and can not be changed after that.

False, variables in C can also have their values updated later in the code.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What value would be outputted for x in the printf() statement after casting to it in the below code?
int x = 5;
double y = 32.23;
x = (int)y;
printf("x is now: %d", x);

Will error, you can not cast a double to an int

32

You can not cast a double to an int without rounding it to a whole number first.

5

6.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Fill in the blank below

The main data types in C are: int, float, double, and ___________ .

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The main data types in C are:

integer, decimal, and letter.

int, float, double and char

if, else, do, while, break, continue

int, str, def, switch, if

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?