C_PROG

C_PROG

University

8 Qs

quiz-placeholder

Similar activities

Աղետների ռիսկի նվազեցում

Աղետների ռիսկի նվազեցում

6th Grade - Professional Development

10 Qs

Specialized translation - W5 - attendance check

Specialized translation - W5 - attendance check

University

12 Qs

BPO1 QUIZ NO. 3

BPO1 QUIZ NO. 3

University

10 Qs

ZERO CONDITIONAL (with "if") 2 level.

ZERO CONDITIONAL (with "if") 2 level.

10th Grade - University

10 Qs

Past deduction & speculation - writing

Past deduction & speculation - writing

11th Grade - University

10 Qs

Reading comprehension

Reading comprehension

University

9 Qs

POSSESSIVE 'S

POSSESSIVE 'S

6th Grade - University

10 Qs

Basic | Adjective orders

Basic | Adjective orders

12th Grade - University

10 Qs

C_PROG

C_PROG

Assessment

Quiz

English

University

Practice Problem

Medium

Created by

Harshitha P

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <stdio.h>

int main()

{

int* pc, c;

c = 5;

pc = &c;

c = 1;

printf("%d", c);

printf("%d", *pc);

return 0;

}

11

1

5

15

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <stdio.h>

int main()

{

int myAge = 43;

int* ptr = &myAge;

printf("%p\n", ptr);

printf("%d\n", *ptr);

return 0;

}

43

0x7ffe102fd7a4

0x7ffe102fd7a4

43

0x7ffe102fd7a4

43

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <stdio.h>

int main()

{

int myNumbers[4] = {25, 50, 75, 100};

printf("%d", sizeof(myNumbers));

return 0;

}

4

8

16

12

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <stdio.h>

int sum(int k);

int main() {

int n=10;

int result = sum(n);

printf("%d", result);

return 0;

}

int sum(int n) {

if (n > 0) {

return n + sum(n- 1);

} else {

return 0;

}

}

10

55

50

30

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <stdio.h>

int main() {

int matrix[2][3] = { {1, 4, 2}, {3, 6, 8} };

printf("%d", matrix[0][2]);

return 0;

}

4

6

3

2

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <stdio.h> #include <string.h> int main() { char a[20]="Program"; char b[20]={'P','r','o','g','r','a','m','\0'}; // using the %zu format specifier to print size_t printf("Length of string a = %zu \n",strlen(a)); printf("Length of string b = %zu \n",strlen(b)); return 0; }

7 ,7

7,8

8,7

8,8

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <stdio.h>

#include <string.h>

int main() {

char first_str[] = "NMIT";

char second_str[] = "NMI"

int res = strcmp(first_str, second_str);

if (res==0)

printf("Strings are equal");

else

printf("Strings are unequal");

return 0;

}

Strings are equal

ERROR

Strings are unequal

1

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?