C_PROG

C_PROG

University

8 Qs

quiz-placeholder

Similar activities

Metals_Introduction

Metals_Introduction

University

10 Qs

TEWWG Passage 1

TEWWG Passage 1

11th Grade - University

11 Qs

ACC20007 MA QUIZ 1

ACC20007 MA QUIZ 1

University

10 Qs

QUIZ 1&2

QUIZ 1&2

University

10 Qs

Chapter 13

Chapter 13

1st Grade - University

10 Qs

Understanding the Water Cycle

Understanding the Water Cycle

6th Grade - University

10 Qs

POST TEST MEETING 1 FOR MANAGEMENT

POST TEST MEETING 1 FOR MANAGEMENT

University

10 Qs

REVIEWUNIT3-GRADE8-MR.NAM

REVIEWUNIT3-GRADE8-MR.NAM

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?