An array arr is declared with the C expression int arr[20];. The expression arr[21] will lead to an index-out-of-bounds error.

CS2110 Flashcard 4 Review

Flashcard
•
Computers
•
University
•
Hard
Quizizz Content
FREE Resource
Student preview

17 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Back
False
2.
FLASHCARD QUESTION
Front
We want to print the address of the string str to the console using printf(). Which format string should replace the empty space in the following C expression? printf(“address: ___”, str);
Back
%p
3.
FLASHCARD QUESTION
Front
An array arr is declared with the C expression int arr[10]. What will the expression sizeof(arr) equal?
Back
The number of bytes in the entire array
4.
FLASHCARD QUESTION
Front
The following string definition using array notation is correct. char str[] = {‘n’,s ‘i’, ‘c’, ‘e’};
Back
False
5.
FLASHCARD QUESTION
Front
A struct containing a char pointer must be malloced within a function and its pointer returned. The struct is malloced successfully. The malloc call for the char pointer returns NULL. Which action will not cause any errors later on? Options: Return NULL, Free the char pointer, then return NULL, Free the struct pointer, then return NULL, Free the struct pointer, then return the struct pointer
Back
Free the struct pointer, then return NULL
6.
FLASHCARD QUESTION
Front
What does sizeof(int) return?
Back
Unknown
7.
FLASHCARD QUESTION
Front
What does this code block print?
Options:
arr[0] = 5, arr[1] = 20, arr[2] = 25, arr[3] = 20 ,
arr[0] = 5, arr[1] = 20, arr[2] = 20, arr[3] = 25 ,
arr[0] = 5, arr[1] = 20, arr[2] = 15, arr[3] = 25 ,
arr[0] = 5, arr[1] = 10, arr[2] = 15, arr[3] = 20
Back
arr[0] = 5, arr[1] = 20, arr[2] = 25, arr[3] = 20
Create a free account and access millions of resources
Similar Resources on Wayground
17 questions
Java-Flashcard for Boyz

Flashcard
•
University
9 questions
Java OOP

Flashcard
•
Professional Development
12 questions
Dog Trivia

Flashcard
•
KG - Professional Dev...
11 questions
CE-LP2 Noções de Linguagens Procedurais

Flashcard
•
KG - University
15 questions
Data Structures and Algorithms Flashcard

Flashcard
•
University
10 questions
Guess the food

Flashcard
•
KG - 12th Grade
15 questions
6th Grade Root Practice

Flashcard
•
KG - University
13 questions
Flashcardz Alianza Udemy

Flashcard
•
University - Professi...
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade