NTT Data Data Types Quiz-1

Question 1

Time: 00:00:00
Aryan is making a questionnaire of “True-false” questions. He wants to define a
data type that stores the response of the candidate for the question. What is the
most-suited data type for this purpose?

 

 

Integer

Integer

Boolean

Boolean

Float

Float

Character

Character

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 2

Time: 00:00:00
What will be the output of following code?

#include <stdio.h>

void main(){

int a=5;

printf(“%d”,A);

}

Undefined.

Undefined.

o

o

5

5

Error

Error

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 3

Time: 00:00:00
What will be the output of following program?

#include <stdio.h>

void main(){

int a=5,b=6;

printf(“%d”,a+b);

}

 

  1. 5

  2. 6

  3. 11

  4. Error


Answer: C

 

5

5

6

6

11

11

Error

Error

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 4

Time: 00:00:00
What will be the output of the following pseudo-code statements:

integer a = 445, b, c, d =10

b = a/d

c = a - b

print c

400

400

401.00

401.00

401

401

401.5

401.5

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 5

Time: 00:00:00
What is the format specifier for long int?

 

 

%d    

%d    

%f

%f

%ld

%ld

None

None

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 6

Time: 00:00:00
What is the output for the following code?

#include <stdio.h>

void main(){

int Computer=5;

printf("%d",computer+5);

}

 

 

 

10    

10    

5

5

55

55

Error

Error

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 7

Time: 00:00:00
What is the range of signed char?

-128 to 127

-128 to 127

-128 to 128

-128 to 128

0 to 255

0 to 255

-255 to 0

-255 to 0

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 8

Time: 00:00:00
What is the storage size of unsigned long?

8 bytes

8 bytes

6 bytes

6 bytes

4 bytes

4 bytes

2 bytes

2 bytes

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 9

Time: 00:00:00
What is the output of the code?

#include <stdio.h>

int main()

{

    float a;

    printf("%d",sizeof(a));

    return 0;

}

 

 

Error

Error

4

4

6

6

8

8

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 10

Time: 00:00:00
A variable cannot be used…

After it is declared

After it is declared

Before it is declared

Before it is declared

In the function, it is declared in

In the function, it is declared in

None of the above

None of the above

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

["0","40","60","80","100"]
["Need more practice!","Keep trying!","Not bad!","Good work!","Perfect!"]

Personalized Analytics only Availble for Logged in users

Analytics below shows your performance in various Mocks on PrepInsta

Your average Analytics for this Quiz

Rank

-

Percentile

0%

Get over 200+ Courses under One Subscription

mute

Don’t settle Learn from the Best with PrepInsta Prime Subscription

Learn from Top 1%

One Subscription, For Everything

The new cool way of learning and upskilling -

Limitless Learning

One Subscription access everything

Job Assistance

Get Access to PrepInsta Prime

Top Faculty

from FAANG/IITs/TOP MNC's

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others.