SASI -1st year -DAY4-FN (21.12.23)

SASI -1st year -DAY4-FN (21.12.23)

Professional Development

15 Qs

quiz-placeholder

Similar activities

SASI -1st year -DAY1-AN(19.12.23)

SASI -1st year -DAY1-AN(19.12.23)

Professional Development

15 Qs

SASI -1st year -DAY1-AN(27.11.23)

SASI -1st year -DAY1-AN(27.11.23)

Professional Development

15 Qs

KTR-CTECH-AN -18.04.2024

KTR-CTECH-AN -18.04.2024

Professional Development

15 Qs

091223    SASI AN

091223 SASI AN

Professional Development

15 Qs

28 12 23         KLU         FN  CLUSTER 5

28 12 23 KLU FN CLUSTER 5

Professional Development

15 Qs

Arrays      A

Arrays A

Professional Development

15 Qs

DSBS-AN-29.01.2024

DSBS-AN-29.01.2024

Professional Development

15 Qs

pointers B

pointers B

Professional Development

16 Qs

SASI -1st year -DAY4-FN (21.12.23)

SASI -1st year -DAY4-FN (21.12.23)

Assessment

Quiz

English

Professional Development

Hard

Created by

CCC info@ccc.training

Used 1+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include<stdio.h> int main() { int arr[5], i=0; while(i<5) arr[i]=++i; for(i=0; i<5; i++) printf("%d, ", arr[i]); return 0; }
1,2,3,4
Garbage value, 1, 2, 3, 4,
2,4
none of these

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h> int main() { foo(ary); } void foo(int **ary) { int i = 10, k = 10, j = 2; int *ary[2]; ary[0] = &i; ary[1] = &j; printf("%d\n", ary[0][1]); }
compile time error
Runtime error
Output : 20
Undefined Behaviour

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include<stdio.h> int main() { int arr[1]={10}; printf("%d\n", 0[arr]); return 0; }
1
10
6
8

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h> void f(int a[][]) { a[0][1] = 3; int i = 0, j = 0; for (i = 0;i < 2; i++) for (j = 0;j < 3; j++) printf("%d", a[i][j]); } void main() { int a[2][3] = {0}; f(a); }
0 3 0 0 0
Junk junk junk
Compile time error
No output

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h> int main() { int nums[3][2] = {{1, 2}, {3, 4}, {5, 6}}; printf("%d", nums[1][0] / nums[2][1]); return 0; }
0
1
2
3

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

int arr[5] = {1, 2, 3, 4, 5}; int sum = 0; for (int i = 0; i < 5; ++i) { sum += arr[i] + i; } printf("%d", sum);
Computes the average of the array elements
Calculates the sum of array elements and their indices
Finds the product of array elements and their indices
Counts the number of odd array elements

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h> int main() { int arr[5] = {1, 2, 3, 4, 5}; printf("%d", arr[2] / arr[4]); return 0; }
0
1
2
compiler error

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?