Search Header Logo

PSC ALM QUIZ

Authored by Starlin Jenila

Computers

University

Used 4+ times

PSC ALM QUIZ
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. 1. Which of the following is not a valid C variable name?

a) int number;

b) float rate;

c) int variable_count;

d) int $main;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

2. All keywords in C are in ____________

a) LowerCase letters

b) UpperCase letters

c) CamelCase letters

d) None of the mentioned

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. 3. What will be the output of the following code snippet?

  2. #include <stdio.h>

  3. int main()

  4. {

  5. int a = 3, b = 5;

  6. int t = a;

  7. a = b;

  8. b = t;

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

  10. return 0;

  11. }

3 5

5 5

3 3

5 3

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. 4. How is an array initialized in C language?

int a[3] = {1, 2, 3};

int a = {1, 2, 3};

int a[] = new int[3]

int a(3) = [1, 2, 3];

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. 5. What is the output of the following code snippet?

  2. #include <stdio.h>

int main()

{

int a[] = {1, 2, 3, 4};

int sum = 0;

for(int i = 0; i < 4; i++)

{

sum += a[i];

}

printf("%d", sum);

return 0;

}

1

4

20

10

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. 6. What is the output of the following code snippet?

int main()

{

int sum = 2 + 4 / 2 + 6 * 2;

printf("%d", sum);

return 0;

}

2

15

16

18

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. 7. How are String represented in memory in C?

An array of characters.

The object of some class.

Same as other primitive data types.

LinkedList of characters.

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?