c coding round 2

c coding round 2

1st Grade

20 Qs

quiz-placeholder

Similar activities

KUIZ ULANGKAJI PSV 2 TINGKATAN 1

KUIZ ULANGKAJI PSV 2 TINGKATAN 1

1st Grade

20 Qs

Shubhi mix 2

Shubhi mix 2

1st - 5th Grade

20 Qs

Modul Teori Seni

Modul Teori Seni

1st Grade

21 Qs

di isi ya anak anak ini masuk nilai

di isi ya anak anak ini masuk nilai

KG - 1st Grade

21 Qs

Wiederholung Noten

Wiederholung Noten

1st - 8th Grade

19 Qs

post test konsep dasar IPA

post test konsep dasar IPA

1st Grade

16 Qs

irama dan pergerakan

irama dan pergerakan

1st - 3rd Grade

20 Qs

AI THÔNG MINH HƠN HỌC VIÊN SUPERBRAIN

AI THÔNG MINH HƠN HỌC VIÊN SUPERBRAIN

1st - 3rd Grade

15 Qs

c coding round 2

c coding round 2

Assessment

Quiz

Arts

1st Grade

Practice Problem

Hard

Created by

Nagendrapatel Puppala

Used 2+ 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

What will be the output of the following C code?

#include <stdio.h>

void main()

{

float x = 0.1;

printf("%d, ", x);

printf("%f", x);

}

0.100000, junk value

Junk value, 0.100000

0, 0.100000

0, 0.999999

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

int x=1;

double y= 0.5 * (exp (x) + exp (-x));

cos(x)

cosh(x)

fmod(x)

modf(x)

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following C code if the system time is 1:52 PM (Sunday)?

#include<stdio.h>

#include<time.h>

int main()

{

struct tm *ptr;

time_t t;

char str[100];

t = time(NULL);

ptr = localtime(&t);

strftime(str,100,"%I",ptr);

puts(str);

return 0;

}

error

01

1

13

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the meaning of the following C code if output is 0?

#include<stdio.h>

#include<time.h>

int main()

{

struct tm *local;

time_t t;

t=time(NULL);

local=localtime(&t);

printf("%d",local->tm_isdst);

return 0;

}

DST is in effect

DST status is unknown

DST is not in effect

DST is corresponding with local time

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following C code?

#include <stdio.h>

void main()

{

register int x = 0;

if (x < 2)

{

x++;

main();

}

}

Segmentation fault

main is called twice

main is called once

main is called thrice

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following C code?

#include <stdio.h>

struct point

{

int x;

int y;

};

void foo(struct point*);

int main()

{

struct point p1[] = {1, 2, 3, 4};

foo(p1);

}

void foo(struct point p[])

{

printf("%d\n", p[1].x);

}

compile error

1

3

2

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following C code?

#include <stdio.h>

void main()

{

float x;

int y;

printf("enter two numbers \n");

scanf("%f %f", &x, &y);

printf("%f, %d", x, y);

}

7.000000, 7

Run time error

7.000000, junk

Varies

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?