Quiz 5 Review

Quiz 5 Review

University

22 Qs

quiz-placeholder

Similar activities

La communication verbale et non-verbale

La communication verbale et non-verbale

University

19 Qs

The Cellular Level of Organization

The Cellular Level of Organization

University

20 Qs

DNA, RNA, and protein synthesis

DNA, RNA, and protein synthesis

University

19 Qs

Science revision

Science revision

1st Grade - University

20 Qs

SIMULASI UTBK SAINTEK FISIKA

SIMULASI UTBK SAINTEK FISIKA

12th Grade - University

20 Qs

Mitosis and Meiosis

Mitosis and Meiosis

6th Grade - Professional Development

20 Qs

Programming in C language

Programming in C language

12th Grade - University

18 Qs

Exploring Cell Organelles and Their Functions

Exploring Cell Organelles and Their Functions

7th Grade - University

17 Qs

Quiz 5 Review

Quiz 5 Review

Assessment

Quiz

Science

University

Practice Problem

Medium

Created by

Anastasiya Masalava

Used 25+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

22 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What will the result of DIVIDE(9 + 6, 3) be if DIVIDE is defined as follows?

#define DIVIDE(A, B) A / B

2

5

11

DIVIDE(9 + 6, 3) would cause a compiler error.

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What will the following code print

#define FOO -3

#if FOO

printf("Oranges ");

#else

printf("Bananas ");

#endif

Oranges

Bananas

Oranges Bananas

This code will not compile

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What lines of code will prevent contents of header file "stuff" from being included more than once?

#ifdef STUFF_H​

#define STUFF_H ​

#endif

Contents of stuff.h​

#ifndef STUFF_H​

#define STUFF_H ​

#endif

Contents of stuff.h​

#ifdef STUFF_H​

#define STUFF_H ​

Contents of stuff.h​

#endif

#ifndef STUFF_H​

#define STUFF_H ​

Contents of stuff.h​

#endif

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the following code print?

char myChar = 'A';

printf("%d", myChar);

'A'

The ASCII value of A

The address of 'A'

This code will cause a compiler error.

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What will the following code print?

int a = 0x22;

a += 7

printf("%d", a);

29

0x29

41

It will not compile

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What will the following code print?

int gpa =4;

gpa <<= 1;

gpa = gpa ^ (gpa - 4);

printf("%d", gpa);

0

4

8

12

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

(T/F) If we had an integer a, ++a and a++ are functionally identical.

True

False

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?