Search Header Logo

C-Extended

Authored by Niranjan C

Computers

University

Used 13+ times

C-Extended
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What will this program print?

  1. main()  

  2. {  

  3.   int i = 2;  

  4.   {  

  5.     int i = 4, j = 5;  

  6.      printf("%d %d", i, j);  

  7.   }    

  8.   printf("%d %d", i, j);  

  9. }  

  1. 4525

  1. 2525

  1. 4545

  1. None of the these

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code?

int x = 5;
int y = 3;
int z = x + y;
printf("%d", z);

5

15

2

8

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the following expression?

int a = 10;
int b = 5;
int c = a * b + 2;
printf("%d", c);

52

50

25

15

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the value of 'num' after executing the following code?

int num = 7;
num += 3;
num *= 2;
printf("%d", num);

20

25

15

10

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many times "javaTpoint" is printed?

  1. #include<stdio.h>  

  2. int main()  

  3. {  

  4.     int x;  

  5.     for(x=-1; x<=10; x++)  

  6.     {  

  7.         if(x < 5)  

  8.             continue;  

  9.         else  

  10.             break;  

  11.         printf("javaTpoint");  

  12.     }  

  13.     return 0;  

  14. }  

  1. 0 times

12 times

  1. 11 times

  1. Infinite times

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many times while loop is executed if a short int is 2 byte wide?

  1. #include<stdio.h>  

  2. int main()  

  3. {  

  4.     int i=1;  

  5.     while(i <= 155)  

  6.     {  

  7.         printf("%c %d\n", i, i);  

  8.         i++;  

  9.     }  

  10.     return 0;  

  11. }  

  1. 154 times

  1. 155 times

  1. 156 times

  1. Infinite times

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which statement is correct about the below program?

  1. #include<stdio.h>  

  2. int main()  

  3. {  

  4.     int i = 8, j = 24;  

  5.     if(i = 8) && if(j = 24)  

  6.         printf("Welcome Programmer");  

  7.     return 0;  

  8. }  

  1. Welcome Programmer

  1. Error: Undeclared identifier if

  1. Error: Expression syntax

  1. No output

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

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?