C Programming Quiz

C Programming Quiz

University

20 Qs

quiz-placeholder

Similar activities

Exploring Portfolio Strategies and Analysis

Exploring Portfolio Strategies and Analysis

University

20 Qs

Digital Etiquette

Digital Etiquette

4th Grade - University

15 Qs

Mapeamento e Normalização BD

Mapeamento e Normalização BD

University - Professional Development

15 Qs

Web Development and Programming

Web Development and Programming

University

20 Qs

GIT Básico

GIT Básico

University

18 Qs

data structures1

data structures1

University

20 Qs

Quiz on List and Tuples

Quiz on List and Tuples

University

16 Qs

GIT Workshop 2021

GIT Workshop 2021

University

20 Qs

C Programming Quiz

C Programming Quiz

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Atharv Sonawane

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...

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

#include<stdio.h> int main() { static int i; for(i = 1;;++i) { if(i == 5) break; printf("%d ",i++); } }

1 3

1 2 3 4

1 2 3

1 2 3 4 5

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

#include<stdio.h> int main() { char a = 10,b = 20; printf("%d\n",scanf("%d %*d",&a,&b)); // Assume input to be : 123 456 printf("a = %d\n",a); printf("b = %d",b); }

1 a = 10 b = 456

1 a = 123 b = 20

2 a = 123 b = 456

2 a = 123 b = 20

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

#include<stdio.h> int foo() { static int i; return ++i*2; } int main() { printf("%d",foo()*foo()*foo()); }

48

16

64

24

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

#include <stdio.h> int main() { int arr[] = {10, 20, 30, 40}; int *ptr = arr; printf("%d ",*ptr++); printf("%d",*++ptr); }

10 30

10 20

20 30

20 40

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

#include<stdio.h> int fun(int n) { if(n <= 1) return 1; return n + fun(n--); } int main() { printf("%d",fun(5)); }

15

16

Infinite loop / Stack overflow

Compilation error

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

#include<stdio.h> struct A { char a; int b; char c; }; struct B { float a; int b; int c; }; int main() { if(sizeof(struct A) == sizeof(struct B)) printf("Equal"); else printf("Not Equal"); }

Equal

Not Equal

Compilation Error

Runtime Error

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

#include<stdio.h> int main() { int x = 8; printf("%d",(x & 1) ? x >> 1 : x << 1); }

0

4

16

Compilation Error

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?

Discover more resources for Computers