C Programming Lab

C Programming Lab

Professional Development

15 Qs

quiz-placeholder

Similar activities

CodeMonkey Platform Management & Resources

CodeMonkey Platform Management & Resources

Professional Development

10 Qs

Understanding AI Basics

Understanding AI Basics

Professional Development

10 Qs

TUGAS 2 PROTOCOL DAN IP ADDRESS

TUGAS 2 PROTOCOL DAN IP ADDRESS

Professional Development

20 Qs

GUESS THAT WORD IN CYBER!

GUESS THAT WORD IN CYBER!

Professional Development

10 Qs

Kuiz TMK Tahun 4

Kuiz TMK Tahun 4

KG - Professional Development

10 Qs

Lesson 3 Model Training

Lesson 3 Model Training

Professional Development

15 Qs

Fun Quiz Pembelajaran Digital

Fun Quiz Pembelajaran Digital

Professional Development

10 Qs

Mobile and Operating Systems

Mobile and Operating Systems

Professional Development

20 Qs

C Programming Lab

C Programming Lab

Assessment

Quiz

Computers

Professional Development

Medium

Created by

karthick k

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

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the scope of an external variable?

Whole source file in which it is defined

From the point of declaration to the end of the file in which it is defined

Any source file in a program

From the point of declaration to the end of the file being compiled

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of this C code?

#include <stdio.h>

void main()

{

int x = 97;

int y = sizeof(x++);

printf("x is %d", x);

}

x is 97

x is 98

x is 99

Run time error

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the below c code?

#include <stdio.h>

void main()

{

char *s = "hello";

char *p = s;

printf("%p\t%p", p, s);

}

Different address is printed

Same address is printed

Run time error

Nothing

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of this C code?

#include <stdio.h>

struct student

{

char a[5];

};

void main()

{

struct student s[] = {"hi", "hey"};

printf("%c", s[0].a[1]);

}

h

i

e

y

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of this C code?

#include <stdio.h>

#define foo(m, n) m * n = 10

int main()

{

printf("in main\n");

}

In main

Compilation error as lvalue is required for the expression m*n=10

Preprocessor error as lvalue is required for the expression m*n=10

None of the mentioned

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of this C code?

void main ()

{

int a=2;

if(a==2)

{

a=~a+2<<1;

printf("%d",a);

}

else

{

a=~a;

}

}

6

-2

0

None of above

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Predict the output of the following C snippets

int main()

{

int main = 56;

printf("%d", main);

return 0;

}

Compiler Error

Depends on the compiler

56

none of above

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?