PSC ALM QUIZ

PSC ALM QUIZ

University

16 Qs

quiz-placeholder

Similar activities

BS TEST2

BS TEST2

University

20 Qs

PSC Quiz1

PSC Quiz1

University - Professional Development

20 Qs

QUIZ MASTERY SHOWDOWN 1ST YEAR SET 2

QUIZ MASTERY SHOWDOWN 1ST YEAR SET 2

University

15 Qs

Competitive Coding-I

Competitive Coding-I

University

20 Qs

C - Strings

C - Strings

University

20 Qs

2D Array and Strings in C

2D Array and Strings in C

University

16 Qs

C Basics

C Basics

University

12 Qs

Programming in C(1)

Programming in C(1)

University

20 Qs

PSC ALM QUIZ

PSC ALM QUIZ

Assessment

Quiz

Computers

University

Medium

Created by

Starlin Jenila

Used 3+ times

FREE Resource

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.

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?