MindTree Pseudo Code Quiz 1

Question 1

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

 

#include<stdio.h>

#include<iostream.h>

int main(){

register n = 25;

int far *x;

x=&n;

printf("%d ",*x);

return 0;

}

25

25

4

4

Address

Address

Compilation error

Compilation error

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

Please login to submit your explanation

Start

Question 2

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

 

integer a = 10,

b = 35, c = 5

print a * b / c - c

65

65

70

70

75

75

Compilation error

Compilation error

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

Please login to submit your explanation

Start

Question 3

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

a=15;

b=0;

if(a=10)

Print b=7;

else b=1;

cout<< b;

1

1

6

6

7

7

10

10

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

Please login to submit your explanation

Start

Question 4

Time: 00:00:00
Output of the following program will be?

#include<iostream.h>

Class Car

{

int x;

}

int main()

{

Car C;

cout < return0;

}

Runtime Error

Runtime Error

Compiler Error

Compiler Error

Garbage Value

Garbage Value

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

Please login to submit your explanation

Start

Question 5

Time: 00:00:00
What is the output of this program?

class main_class {

public static void main(String args[])

{

if (i == 20) {

int j= 18;

System.out.println(i);

}

}

}

 

20

20

18

18

Compilation Error

Compilation Error

Runtime error

Runtime error

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

Please login to submit your explanation

Start

Question 6

Time: 00:00:00
Find out the error, if any in the below program?

int j = 1;

switch(j)  {  printf("hello Prepster!");  case 1:

printf("case1");  break;

case 2: printf("case2");  break;  }

Case 1  

Case 1  

Case2

Case2

Both A & B

Both A & B

No error

No error

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

Please login to submit your explanation

Start

Question 7

Time: 00:00:00
find the output of the following code

 

int main( )

{

int a=5, i, f1, f2, j;

if ( a < 2 )

return a;

else

{

f1 = f2 = 1;

for(i=2;i<n;i++)

{

j = f1 + f2;

f2 = f1;

f1 = j;

}

printf("%d",j) ;

}

}

5

5

6

6

7

7

8

8

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

Please login to submit your explanation

Start

Question 8

Time: 00:00:00
If the value of a=5 and b=7 what will be the output of the following function?

int fun(int a, int b)

{

if(a<=0)

return b;

else

return(fun(a-1,b-1));

}

1

1

2

2

3

3

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

Please login to submit your explanation

Start

Question 9

Time: 00:00:00
Choose the appropriate response after analysing the function given below.

 

 

public static void main(String[] args)

{

String names[] = new String[5];

for(int x=0; x<args.length; x++)

names[x] = args[x];

System.out.println(names[2]);

}

Null

Null

names

names

Compilation error

Compilation error

Runtime error

Runtime error

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

Please login to submit your explanation

Start

Question 10

Time: 00:00:00
You must determine the proper output of the provided pseudocode, which is shown below.

 

 

int main()

{

float i = 0.0;

long int j = 10;

printf("%d", sizeof(i) == sizeof(i+j));

return 0;

}

1

1

2

2

4

4

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

Please login to submit your explanation

Start

["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%

Completed

0/10

Accuracy

0%

Prime

Prime Video

Complete Video Course for MindTree

For MindTree
Prime Mock

Prime

Prime Mock

Topic-Wise Full Mock and much more

For MindTree
Prime Mock
Get Prepinsta Prime

Get all 200+ courses offered by Prepinsta

Never Miss an OffCampus Update

Get OffCampus Updates on Social Media from PrepInsta

Follow us on our Media Handles, we post out OffCampus drives on our Instagram, Telegram, Discord, Whatsdapp etc.

Get Hiring Updates
Amazon,Google,Delottie & 30+companies are hiring ! Get hiring Updates right in your inbox from PrepInsta

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.

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.

Get PrepInsta Prime Subscription

Get access to all the courses that PrepInsta offers, check the out below -

Companies

TCS, Cognizant, Delloite, Infosys, Wipro, CoCubes, KPMG, Amazone, ZS Associates, Accenture, Congnizant & other 50+ companies

Programming

Data Structures, Top 500 Codes, C, C++, Java Python & other 10+ subjects

Skills

Full Stack Web Development, Data Science, Machine Learning, AWS Cloud, & other 10+ skills and 20+ projects

Comments