fundamentals on c

fundamentals on c

Professional Development

10 Qs

quiz-placeholder

Similar activities

Misión: construye el programa en C

Misión: construye el programa en C

Professional Development

11 Qs

Hardest Quiz Ever

Hardest Quiz Ever

KG - Professional Development

10 Qs

Saying hello in different languages Part 1

Saying hello in different languages Part 1

Professional Development

15 Qs

C Programming

C Programming

Professional Development

15 Qs

TCS Preparation

TCS Preparation

Professional Development

10 Qs

Java Strings

Java Strings

1st Grade - Professional Development

10 Qs

GFG Quiz

GFG Quiz

11th Grade - Professional Development

10 Qs

Character Functions

Character Functions

Professional Development

10 Qs

fundamentals on c

fundamentals on c

Assessment

Quiz

Other

Professional Development

Hard

Created by

Prasanth Kumar

Used 13+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

who is the father of c language

bjoune strousstrip

dennis m ritchie

dr e.f coud

james a .gosling

2.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

#include<stdio.h>

int main()

{

int n;

for(n = 7; n!=0; n--)

printf("n = %d", n--);

getchar();

return 0;

}

infinite loop

finite loop

3.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

find the output of snippet?

#include<stdio.h>

int main()

{

printf("%x", -1<<1);

getchar();

return 0;

}

dependent on the compiler

independent on the compiler

error

compile successfully

4.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

# include <stdio.h>

# define scanf "%s Geeks For Geeks "

main()

{

printf(scanf, scanf);

getchar();

return 0;

}

Output: %s Geeks For Geeks Geeks For Geeks

Output: %d Geeks For Geeks Geeks For Geeks

Output: %f Geeks For Geeks Geeks For Geeks

Output: %c Geeks For Geeks Geeks For Geeks

5.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

#include<stdio.h>

char *getString()

{

char str[] = "Will I be printed?";

return str;

}

int main()

{

printf("%s", getString());

getchar();

}

Output:accurate value

Output: Some garbage value

Output:error

Output:not compile

6.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

#include<stdio.h>


main()

{

char s[]="hello", t[]="hello";

if(s==t){

printf("eqaul strings");

}

}

equal

unequal

will have output

no output

7.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What is the output of the following program?

#include<stdio.h>


main()

{

float t = 2;


switch(t)

{

case 2: printf("Hi");

default: printf("Hello");

Hi

HiHello

Hello

Error

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?