C-Extended

C-Extended

University

16 Qs

quiz-placeholder

Similar activities

PSC Quiz1

PSC Quiz1

University - Professional Development

20 Qs

C - Flow Control

C - Flow Control

University

20 Qs

Competitive Coding-I

Competitive Coding-I

University

20 Qs

Programming in C(1)

Programming in C(1)

University

20 Qs

C - Strings

C - Strings

University

20 Qs

C - Structures

C - Structures

University

20 Qs

2D Array and Strings in C

2D Array and Strings in C

University

16 Qs

EST102 : PROGRAMMING IN C TEST 1

EST102 : PROGRAMMING IN C TEST 1

University

20 Qs

C-Extended

C-Extended

Assessment

Quiz

Computers

University

Hard

Created by

Niranjan C

Used 13+ times

FREE Resource

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

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?