CODE4KITSW

CODE4KITSW

University

30 Qs

quiz-placeholder

Similar activities

Tech CivilWar

Tech CivilWar

University

30 Qs

DEBUGGING

DEBUGGING

University

26 Qs

C++ Basics

C++ Basics

University

25 Qs

Technical Quiz WCC

Technical Quiz WCC

University

30 Qs

c language

c language

University

25 Qs

Repaso C Cs50

Repaso C Cs50

University

30 Qs

Lập trình C

Lập trình C

University

30 Qs

ICE1111 Revision

ICE1111 Revision

University

30 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?