QUESTION 8 Which of these is valid C code to read in an integer, given the follo
ID: 3555364 • Letter: Q
Question
QUESTION 8
Which of these is valid C code to read in an integer, given the following declaration?
int k;
scanf("%i", &k);
scanf("%i", *k);
scanf("%i", k);
scanf("%i ", k);
5 points
QUESTION 9
Given:
int a= 36, b= 7, result;
result = a / b ;
The value of result will be:
5.142857
5
6
1
5 points
QUESTION 10
Which of the following is a complete, legal C program?
A.
#include <math.h>
#include <stdio.h>
#define HALF 0.5
main() {
printf(
scanf("%i", &k);
scanf("%i", *k);
scanf("%i", k);
scanf("%i ", k);
Explanation / Answer
8. scanf("%i", &k);
9. 5
10. A.
#include <math.h>
#include <stdio.h>
#define HALF 0.5
main() {
printf(
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.