Search Header Logo

fundamentals on c

Authored by Prasanth Kumar

Other

Professional Development

Used 13+ times

fundamentals on c
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

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

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?