• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 7 pages
Exam (elaborations)

C for Everyone: Programming Fundamentals Final UPDATED Exam Questions and CORRECT Answers

Document preview thumbnail
Preview 2 out of 7 pages

C for Everyone: Programming Fundamentals Final UPDATED Exam Questions and CORRECT Answers Who invented the C language? - Correct Answer- 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. - Correct Answer- True Which is true:

Content preview

C for Everyone: Programming
Fundamentals Final UPDATED Exam
Questions and CORRECT Answers
Who invented the C language? - Correct Answer- 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. - Correct Answer- 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(). - Correct Answer- 1, 3, 4


The statement printf("HELLO\t\tWORLD\n"); - Correct Answer- Prints HELLO WORLD
followed by a new line


The expression PI * radius * radius would be used to compute - Correct Answer- A circles
area


In a format string for printf which would you use to print an int? - Correct Answer- %d


The code


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


Displays a common error - Correct Answer- 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,
} - Correct Answer- 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 - Correct Answer- 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 - Correct Answer- 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 - Correct Answer- 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 - Correct Answer- 0

Document information

Uploaded on
August 26, 2024
Number of pages
7
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$8.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

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.
STANFORDGRADESS
4.0
(241)
Sold
1682
Followers
109
Items
121806
Last sold
23 hours ago



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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions