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

C for Everyone: Programming Fundamentals Final Exam (Week 6) 2023 with complete solution

Rating
-
Sold
-
Pages
5
Grade
A+
Uploaded on
09-08-2023
Written in
2023/2024

C for Everyone: Programming Fundamentals Final Exam (Week 6) 2023 with complete solution Who invented the C language? Dennis Ritchie invented C at Bell Labs When you compile a correct C program you get a machine executable file such as produced by the gnu compiler gcc. True Which is true: 1. #define is a preprocessor command often used to introduce named constants 2. double and goto are keywords declaring types. 3. return (0); is normally the last statement in main() 4. The file stdio.h is where the compiler finds scanf(). 1, 3, 4 The statement printf("HELLOttWORLDn"); Prints HELLO WORLD followed by a new line The expression PI radius radius would be used to compute A circles area In a format string for printf which would you use to print an int? %d The code i = -10; while ( i < 0) { ... do something ; i--; } Displays a common error its an infinite loop The following program is suppose to write Hello World onto the screen but it has syntax errors - find and correct. #include <stdio.h> int main(void) { printf(" Hello Worldn"); return 0, } It should be return 0; Assume the given declarations and fill in the value of the expression . int a = 3, b = 4, c = 0, d = '1'; Expression: a % b 3

Show more Read less
Institution
Course









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

Written for

Course

Document information

Uploaded on
August 9, 2023
Number of pages
5
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

C for Everyone: Programming Fundamentals Final Exam
(Week 6) 2023 with complete solution
Who invented the C language?
Dennis Ritchie invented C at Bell Labs
When you compile a correct C program you get a machine executable file such as
a.out produced by the gnu compiler gcc.
True
Which is true:

1. #define is a preprocessor command often used to introduce named constants
2. double and goto are keywords declaring types.
3. return (0); is normally the last statement in main()
4. The file stdio.h is where the compiler finds scanf().
1, 3, 4
The statement printf("HELLO\t\tWORLD\n");
Prints HELLO WORLD followed by a new line
The expression PI radius radius would be used to compute
A circles area
In a format string for printf which would you use to print an int?
%d
The code

i = -10;
while ( i < 0)
{ ... do something ; i--; }

Displays a common error
its an infinite loop
The following program is suppose to write Hello World onto the screen but it has
syntax errors - find and correct.

#include <stdio.h>
int main(void)
{
printf(" Hello World\n");
return 0,
}
It should be return 0;
Assume the given declarations and fill in the value of the expression . int a = 3, b
= 4, c = 0, d = '1';

Expression: a % b
3

, Assume the given declarations and fill in the value of the expression . int a = 3, b
= 4, c = 0, d = '1';

Expression: b % a
1
Assume the given declarations and fill in the value of the expression . int a = 3, b
= 4, c = 0, d = '1';

Expression: a < b
1
Assume the given declarations and fill in the value of the expression . int a = 3, b
= 4, c = 0, d = '1';

Expression: c < b && a > 3
0
Assume the given declarations and fill in the value of the expression . int a = 3, b
= 4, c = 0, d = '1';

Expression: a / b > c
0
Assume the given declarations and fill in the value of the expression . int a = 3, b
= 4, c = 0, d = '1';

Expression: c = a++
3
Assume the given declarations and fill in the value of the expression . int a = 1, b
= 2, c = 3;

Expression: a - b * c
-5
Assume the given declarations and fill in the value of the expression . int a = 1, b
= 2, c = 3;

Expression: c / a * b
6
Assume the given declarations and fill in the value of the expression . int a = 1, b
= 2, c = 3;

Expression: a++ + --b
2
Assume the given declarations and fill in the value of the expression . int a = 1, b
= 2, c = 3;

Expression: b = a = c
3

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.
magdamwikash23 Western Governers University
Follow You need to be logged in order to follow users or courses
Sold
111
Member since
2 year
Number of followers
94
Documents
5329
Last sold
2 weeks ago
Magda

NURSING STUDY GUIDES/EXAMS AND NOTES ALL VERIFIED BY EXPERTS All my uploaded documents, exams and essays are verified by relevant experts.I can assure an A or at least 90% if you use any of my documents.

3.9

14 reviews

5
7
4
2
3
2
2
2
1
1

Recently viewed by you

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