arraytest
Submit solution
C
Points:
10 (partial)
Time limit:
8.0s
Memory limit:
64M
Author:
Problem type
Allowed languages
Get the size of 2D array and the input values from the user. Print the array and sum.
Comments
Answer all Questions Part A [25 Marks – 1 hour 15 minutes]
int main() { / declare variables /
/read the values of a and b from the keyboard/
/compute the volume of the sphere /
/display the result onto the screen/
return 0; } 5. a. Predict the output of the following code snippet. [CO2][BTL2][2 Marks]
include <stdio.h>
void fn() { int i = 10; printf("%d ", ++i); } int main() { fn(); fn(); }
Page 5 of 5 b. Predict the output of the following code [CO2][BTL2][3 Marks]
include<stdio.h>
int a=10; void disp(); main() { int a=20; { int a=30; printf("Value of a:%d\n",a); } printf("Value of a:%d\n",a); disp(); return; } void disp() { printf("Value of a:%d\n",a); return; }
CO Marks BTL Marks CO01 5 BTL 1 5 CO02 5 BTL 2 10 CO03 5 BTL 3 25 CO04 25 BTL 4