Reliance Jio Pseudo Code Quiz 1

Question 1

Time: 00:00:00
How many iteration are done to find 7 using binary search in pseudocode?
#include<iostream>
using namespace std;
int main()
{
arr[5] = {2, 6, 7, 9, 10};
return 0;
}

2

2

3

3

1

1

4

4

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

Please login to submit your explanation

Start

Question 2

Time: 00:00:00
Find the output of the following code?
#include<iostream>
using namespace std;
int main(){
int arr[6]= {2,4,6,8,10,12};
for(int i=0;i<6;i+=3){
cout<<arr[i]<<" ";
}
return 0;
}

2 6 10

2 6 10

4 8 12

4 8 12

2 8

2 8

4 12

4 12

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 value of sum in the following code for n =5?
#include<iostream>
using namespace std;
int main(){
int n, sum =0;
int i=0;
while(i<=n){
sum = i+n;
i+=2;
}
cout<<sum;
return 0;
}

21

21

9

9

10

10

11

11

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

Please login to submit your explanation

Start

Question 4

Time: 00:00:00
What will be the output of the following code ?
#include<iostream>
using namespace std;
int main(){
string str = "Prepinsta";
string s;
for(int i=0;i<str.length(); i+=2){
s += str[i];
}
s.pop_back();
cout<<s;
return 0;
}

Peis

Peis

Peisa

Peisa

eisa

eisa

Pisa

Pisa

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 will be the output of the code?
#include<iostream>
using namespace std;
int main(){
string str = "*";
string s;
for(int i=0;i<10; i+=3){
s += str[0];
if(i%2!=0) s+= "#";
}
cout<<s;
return 0;
}

**#**#

**#**#

#**#**

#**#**

***#***#

***#***#

#***#*

#***#*

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

Please login to submit your explanation

Start

Question 6

Time: 00:00:00
what is the output of the following code?
#include<iostream>
using namespace std;
int main(){
int ans = ' ' * 10;
cout<<ans;
return 0;
}

320

320

10

10

40

40

340

340

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

Please login to submit your explanation

Start

Question 7

Time: 00:00:00
What is the output of the code ?
#include<iostream>
using namespace std;
int main(){
int arr[5] = {2,4,3,5,6,};
for(int i=0 ; i<3; i++){
arr[i] = arr[i+1] + arr[i+2];
}
for(int i=0;i<5;i++){
cout<<arr[i]<<" ";
}
return 0;
}

7 8 11 8 9

7 8 11 8 9

7 8 11 5 6

7 8 11 5 6

1 3 4 5 6

1 3 4 5 6

8 5 3 2 10

8 5 3 2 10

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

Please login to submit your explanation

Start

Question 8

Time: 00:00:00
What will following code do?
#include<iostream>
using namespace std;
int main(){
string s = "prepinsta";
int i=0;
for(int j=s.length()-1; j>=0; j--){
cout<<s[i];
i++;
}
return 0;
}

Reverse the string

Reverse the string

Don’t change the string

Don’t change the string

Remove the characters from string

Remove the characters from string

Print half characters from string

Print half characters from string

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

Please login to submit your explanation

Start

Question 9

Time: 00:00:00
What will be the output of the following code?
#include<iostream>
using namespace std;
int main(){
string s = "prepinsta";
int i=0;
for(int j=s.length()-1; j>=4; j--){
cout<<s[i];
i+=2;
}
return 0;
}

peise

peise

ppnta

ppnta

pepsa

pepsa

peita

peita

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

Please login to submit your explanation

Start

Question 10

Time: 00:00:00
What will code do the ?
#include<iostream>
using namespace std;
int main(){
string str = "prepinsta";
int i=0, j=str.length()-1;
while(i<=j){
swap(str[i],str[j]);
i++;
j--;
}
return 0;
}

Don’t change the string

Don’t change the string

Reverse the string

Reverse the string

Swap the last character

Swap the last character

Delete the middle character

Delete the middle character

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 Reliance Jio

For Reliance Jio
Prime Video

Prime

Prime Mock

Topic-Wise Full Mock and much more

For Reliance Jio
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