Introduction & Basic Program Structure

Introduction & Basic Program Structure

University

10 Qs

quiz-placeholder

Similar activities

Présentation_FionaP_I-Tracing_7

Présentation_FionaP_I-Tracing_7

University

7 Qs

Structured Programming

Structured Programming

University

11 Qs

QUIZ-group5

QUIZ-group5

University

10 Qs

C_i_Quiz

C_i_Quiz

University

12 Qs

Hhhjj

Hhhjj

10th Grade - University

10 Qs

ASSESMEN SUMATIF

ASSESMEN SUMATIF

2nd Grade - University

10 Qs

Kuis tentang Kecerdasan Buatan

Kuis tentang Kecerdasan Buatan

University

5 Qs

Dart Built-In Functions Quiz

Dart Built-In Functions Quiz

University

15 Qs

Introduction & Basic Program Structure

Introduction & Basic Program Structure

Assessment

Quiz

Information Technology (IT)

University

Hard

Created by

Willone Lim

Used 4+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

Which of the following is a valid C main() declaration?

main() { ... }

void main() return 0;

int main() { return 0; }

int main;

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

Every C program must have a main() function.

True

False

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

In C, each statement must end with:

Colon, :

Semicolon, ;

Period, .

Parentheses, ()

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

What will the output be?

gcc.exe: fatal error: no input files

Hello World

HelloWorld

gcc.exe: fatal error: no input files

"C:\path\to\your\compiler.exe" failed to launch (exit code: 0)

5.

MULTIPLE SELECT QUESTION

20 sec • 1 pt

Media Image

Which format specifier(s) are used for an integer in printf? Select more than one answer (Select all that apply)

%f

%d

%c

%i

%s

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

What will the following code output?

A

Hello World

format '%i' expects argument of type 'int', but argument 2 has type 'char'

65

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

Which of the following is the correct way to read an integer input into variable num?

scanf("%d", num);

scanf("%i", &num);

scanf("%s", &num);

scanf("%d", &num[]);

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?