Search Header Logo

Gate-C_language questions

Authored by Ajeet Kumar

Computers

University

Gate-C_language questions
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the following declarations:

P: signed short x;

Q: unsigned long long int x;

Which of the given declarations is/are CORRECT?

Only P

Only Q

Both P and Q

Neither P nor Q

2.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Consider the following program:

#inclue<stdio.h>

int main( ) {

int x = 32769;

printf("%d", x);

return 0;

}

(Assume integer is of 2 bytes) The value printed is- ____________.

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Consider the following program:

#include<include>

int main( ) {

char ch = 141;

printf(“%d”, ch);

return 0;

}

The output is -

Compiler error

–115

–128

141

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the following function:

#include<stdio.h>

int main() {

char ch = –134;

printf("%c", ch);

return 0; }

The output is-

A

Garbage

Compiler Error

Z

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include<stdio.h>

int main(void){

int a;

a = 2 * 6/5 + 3.0/2 + 1;

printf("%d", a);

return 0; }

The value of a is ___

4.9

4.0

4.5

4

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?