Search Header Logo

CODE4KITSW

Authored by VISHWANATH REDDY

Other

University

Used 2+ times

CODE4KITSW
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

10 sec • 10 pts

#include <stdio.h>

int main() {

    printf("Welcome to Code4KITSW!");

    return 0;

}

What will be the output?

Welcome to Code4KITSW!

Welcome to Code4KITSW followed by a space

Compiler error

No output

2.

MULTIPLE CHOICE QUESTION

10 sec • 10 pts

Which of these is a valid C variable name?

2name

_varName

var-name

char

3.

MULTIPLE CHOICE QUESTION

20 sec • 10 pts

#include <stdio.h>

int main() {

    int a = 7, b = 3;

    printf("%d", a % b);

    return 0;

}

What will this program print?

1

2

3

Compiler error

4.

MULTIPLE CHOICE QUESTION

10 sec • 10 pts

Which keyword is used to exit a loop prematurely?

break

continue

return

exit

5.

MULTIPLE CHOICE QUESTION

30 sec • 10 pts

#include <stdio.h>

int main() {

    int x = 5;

    printf("%d %d", x++, ++x);

    return 0;

}

What is the output?

5 7

6 7

5 6

Undefined behavior

6.

MULTIPLE CHOICE QUESTION

10 sec • 10 pts

What is the default value of an uninitialized int variable?

0

1

Garbage value

Depends on compiler

7.

MULTIPLE CHOICE QUESTION

20 sec • 10 pts

#include <stdio.h>

int main() {

    int x = 0;

    if (x = 1)

        printf("True");

    else

        printf("False");

    return 0;

}

What is the output?

True

False

Compiler error

Undefined behavior

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

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?