100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Exam (elaborations)

Programming Final UPDATED Exam Questions and CORRECT Answers

Rating
-
Sold
-
Pages
13
Grade
A+
Uploaded on
19-08-2024
Written in
2024/2025

Programming Final UPDATED Exam Questions and CORRECT Answers What must every C program have? - CORRECT ANSWER- Main Every statement in C must end with a... - CORRECT ANSWER- semicolon(;) What is NOT a valid integer value? - CORRECT ANSWER- any decimal point because they are FLOATS What is an INVALID identifier (variable name)? - CORRECT ANSWER- ex: 5test (because it begins with a number) ex: _test (this works, but it is not recommended)

Show more Read less
Institution
Programming
Course
Programming









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Programming
Course
Programming

Document information

Uploaded on
August 19, 2024
Number of pages
13
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Content preview

Programming Final UPDATED Exam
Questions and CORRECT Answers

What must every C program have? - CORRECT ANSWER- Main


Every statement in C must end with a... - CORRECT ANSWER- semicolon(;)


What is NOT a valid integer value? - CORRECT ANSWER- any decimal point because they
are FLOATS


What is an INVALID identifier (variable name)? - CORRECT ANSWER- ex: 5test (because
it begins with a number)


ex: _test (this works, but it is not recommended)


What is an iteration/loop statement? - CORRECT ANSWER- - do...while
- for


if and if...else are NOT looping statements!


How many times will the following program print hello?


i = 1;
while (i<=10)
{ printf("hello"); } - CORRECT ANSWER- An infinite amount of times -->


because there is no increment and the condition is always true


Consider the following correct segment of a correct C program:

, p=2;
while (p<1000)
{ p = 2*p; }


What is the value of p AFTER this while loop completes its execution? - CORRECT
ANSWER- 1024


because the numbers are always going to end in even digits, and anything higher than in the
thousands is incorrect because of the condition


An uninitialized variable contains _________________. - CORRECT ANSWER- the value
last stored in the memory location reserved for that variable


What is the FINAL value of x after performing the following operations?


int x = 21;
double y = 6;
double z = 14;
y = x/z;
x = 5.5*y; - CORRECT ANSWER- 8.25


(double = doubling the float)
when you're diving an integer by a float, the answer is a float.


Having a loop within a loop is known as... - CORRECT ANSWER- nesting


Which assignment expression is equivalent to c = c/2?


a. c / = 2
b. c / c = 2
c. c /= 2

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
MGRADES Stanford University
View profile
Follow You need to be logged in order to follow users or courses
Sold
1134
Member since
2 year
Number of followers
104
Documents
69677
Last sold
7 hours ago
MGRADES (Stanford Top Brains)

Welcome to MGRADES Exams, practices and Study materials Just think of me as the plug you will refer to your friends Me and my team will always make sure you get the best value from the exams markets. I offer the best study and exam materials for a wide range of courses and units. Make your study sessions more efficient and effective. Dive in and discover all you need to excel in your academic journey!

3.8

178 reviews

5
76
4
31
3
47
2
9
1
15

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions