Search Header Logo

SASI -BATCH 3-DAY2-FN

Authored by CCC info@ccc.training

English

Professional Development

Used 5+ times

SASI -BATCH 3-DAY2-FN
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h> int main() { int x = 1; short int i = 2; float f = 3; if (sizeof((x == 2) ? f : i) == sizeof(float)) printf("float\n"); else if (sizeof((x == 2) ? f : i) == sizeof(short int)) printf("short int\n"); }

float
short int
Undefined behaviour
Compile time error

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h> void main() { int k = 8; int m = 7; int z = k < m ? k++ : m++; printf("%d", z); }

7
8
Run time error
15

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h> void main() { 1 < 2 ? return 1 : return 2; }

returns 1
returns 2
varies
Compile time error

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h> int main() { int num = 7; if (num % 2 == 0) { printf("Even\n"); } else { printf("Odd\n"); } return 0; }

even
odd
neither even nor odd
error

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h> int main() { int a = 10; double b = 5.6; int c; c = a + b; printf("%d", c); }

15
16
15.6
10

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h> int main() { int a = 10, b = 5, c = 5; int d; d = a == (b + c); printf("%d", d); }

Syntax error
1
10
5

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

(x = foo()) != 1 considering foo() returns 2

2
True
1

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?