Question
1. With the statement, int grades[] = {70,80,90,100,50}; What is statement to change the array element 100 to 99? a. grades[3]=99; b. grades(3)=99; c. grades(4)=99;
1. With the statement,
int grades[] = {70,80,90,100,50};
What is statement to change the array element 100 to 99?
a. grades[3]=99;
b. grades(3)=99;
c. grades(4)=99;
d. grades[4]=99;
2. With the statement,
int grades[] = {70,80,90,100,50};
What is statement to assign user input to array element 70?
a. scanf(%d, grades[0]);
b. scanf(%d, grades[1]);
c. scanf(%d, &grades[0]);
d. scanf(%d, &grades[1]);
3.
With the statement,
int values[10] = {1,2,3,4,5};
printf(%d, values[9]);
What is the output?
a. 10
b. 0
c. 9
d. runtime error
4. With the statement,
int values[][]={{1,2},{3,4},{5,6},{7,8},{9,10}};
What is the array size?
a.values[2][5]
b. values[1][10]
c. values[5][2]
d. values[10][1]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started