Levels Tought:
Elementary,Middle School,High School,College,University,PHD
Teaching Since: | Jul 2017 |
Last Sign in: | 210 Weeks Ago, 1 Day Ago |
Questions Answered: | 15833 |
Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
Please do this quiz for me. The quiz is under the attach file
CS1050 – C Programming Quiz 1 Summer 2016
There are 10 questions on this quiz. DO NOT PUT YOUR ANSWERS ON THIS SHEET – RECORD THEM ON THE ANSWER SHEET ONLY.Use the code below to answer the next several questions.
a. #include<stdio.h>
b. /* This program will add two numbers together */
c. int main( )
d. {
e. intnum1;
f. int num2;
g. int total;
h. printf(“Enter a number:”);
j. scanf(“%d”, &num1);
k. printf(“Enter a number:”);
m. scanf(“%d”, &num2);
n. total = num1 - num2;
o. printf("The number %d added to the number %d will equal %d\n”, num1, num2, total);
p. return 0
r. }
1) What is on line “b” of this program?
2) In this code there is a function named “main()”. List the name of two other functions in this code.
3) Which line of code has a syntax (compile) error?
4) Which line of code has a logic error?
5) T / F The statement on line “a” of this program is optional and not needed in this program.
6) List the escape sequence character used in this program.
7) List just one of the 2 different types of variables we can define to store numbers with DECIMAL positions. There are 2 types – list just one.
8) List just one of the 3 different types of variables we can define to store WHOLE numbers with no decimal positions. There are 3 types – just list one.
9) The command that we use to compile our C programs is _______________ .
10)The editor that we use to type our program in is called _________________ .
CS1050 – C Programming Quiz 1 - ANSWERS NAME _____________________________________________
Summer 2016
1. ______________________________________________________
2. ______________________________________________________
______________________________________________________
3. ________________
4. _________________________________________________________________________________________________________________
5. T / F
6. ________________
7. ______________________________________________________
8. ______________________________________________________
9. ________________
10. ______________
----------- ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly