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

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

Professional Development

15 Qs

quiz-placeholder

Similar activities

Currencies and Symbols

Currencies and Symbols

Professional Development

12 Qs

Small talk about the weather

Small talk about the weather

Professional Development

14 Qs

De todo

De todo

1st Grade - Professional Development

16 Qs

PRU Life UK Trivia

PRU Life UK Trivia

Professional Development

10 Qs

HỘI THAO BÙNG CHÁY

HỘI THAO BÙNG CHÁY

KG - Professional Development

15 Qs

K10 - Bài 19: Câu lệnh if

K10 - Bài 19: Câu lệnh if

Professional Development

10 Qs

Sasi-FN-04.05.2024

Sasi-FN-04.05.2024

Professional Development

15 Qs

SMC NATIONAL CHAKRAVYUHA CHALLENGE #1

SMC NATIONAL CHAKRAVYUHA CHALLENGE #1

KG - Professional Development

20 Qs

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

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

Assessment

Quiz

English

Professional Development

Practice Problem

Hard

Created by

CCC info@ccc.training

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?