Question 18 Question 21 Question 14 Assuming an array declaration, int num[5], how will num be passed to a function? Select one: a. display(&num); b. display(num); c. display(&num[i]); d. display(num[5]); Clear my choice What is the output of the following code fragment: int num[5]; num[0] = 7; num[1] = 3; num[2] = 4; num[3] = 1; num[4] = 9; printf("%d", num[2+1]); Answer: It is the value that is automatically assigned to the remaining elements of the array when the initialize list is less than the size. Select one: a. 0 b. 10 c. 1 d. \l Clear my choice

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 28SA
icon
Related questions
Question
100%

Please help me with this one. Multiple choice only except Question 21.

Question 18
Question 21
Question 14
Assuming an array declaration, int num[5], how will num be passed to a function?
Select one:
a. display(&num);
b. display(num);
c. display(&num[i]);
d. display(num[5]);
Clear my choice
What is the output of the following code fragment:
int num[5];
num[0] = 7;
num[1] = 3;
num[2] = 4;
num[3] = 1;
num[4] = 9;
printf("%d", num[ 2+1]);
Answer:
It is the value that is automatically assigned to the remaining elements of the array when the
initialize list is less than the size.
Select one:
a. 0
b. 10
c. 1
d. \1
Clear my choice
Transcribed Image Text:Question 18 Question 21 Question 14 Assuming an array declaration, int num[5], how will num be passed to a function? Select one: a. display(&num); b. display(num); c. display(&num[i]); d. display(num[5]); Clear my choice What is the output of the following code fragment: int num[5]; num[0] = 7; num[1] = 3; num[2] = 4; num[3] = 1; num[4] = 9; printf("%d", num[ 2+1]); Answer: It is the value that is automatically assigned to the remaining elements of the array when the initialize list is less than the size. Select one: a. 0 b. 10 c. 1 d. \1 Clear my choice
Question 19
Question 22
What is the output of C Program with arrays.?
int main(){
char str]={"C","A","T","\0");
printf("%s",str);
return 0;
Select one:
a. CAT10
b. compile error
C. CAT
d. C
Clear my choice
Which of the following is a correct function definition?
Select one:
a. int funct(int x)
{return x=x+1;}
b. void funct
{ printf("Hello"); }
c. void funct(x)
{return x++; }
d. int funct();
{ printf("Hello!");
Transcribed Image Text:Question 19 Question 22 What is the output of C Program with arrays.? int main(){ char str]={"C","A","T","\0"); printf("%s",str); return 0; Select one: a. CAT10 b. compile error C. CAT d. C Clear my choice Which of the following is a correct function definition? Select one: a. int funct(int x) {return x=x+1;} b. void funct { printf("Hello"); } c. void funct(x) {return x++; } d. int funct(); { printf("Hello!");
Expert Solution
steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning