CODE4KITSW

CODE4KITSW

University

30 Qs

quiz-placeholder

Similar activities

C for beginners

C for beginners

University

28 Qs

trial

trial

University

26 Qs

round 2

round 2

University

25 Qs

2.2mo

2.2mo

University

35 Qs

Modeule-I-C

Modeule-I-C

University

25 Qs

C Programming

C Programming

12th Grade - University

25 Qs

Repaso C Cs50

Repaso C Cs50

University

30 Qs

Conceptos básicos de C++

Conceptos básicos de C++

University

25 Qs

CODE4KITSW

CODE4KITSW

Assessment

Quiz

Other

University

Medium

Created by

VISHWANATH REDDY

Used 2+ times

FREE Resource

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

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?