Java MCQ(may be option will be suffeld)
1 if syntax is incorrect
2 awk'BEGIN {FS=" "}{if($5=="Yes"){print $2,$4}}' product.txt
3 Display line 2 to 10 from file1
4 True (not got execueted as there is not BEGIN)
5 name="unix"
echo "Hello $name"
9 LENGTH()
10 SELECT *FROM Toddler Where NAME='A%'
14 ALTER TABLE table_name
ADD column_name datatype;
15 update Employee set designation=ITA where loaction is null
16 var carName="Honda City";
17 Object (type of var x={firstName:"TCS",lastName="ILP"};)
18 Number 16
19 Required
20 h6
21 on clikcking the "clickme ' linnk it will open google.com in parent frame
22 Background blue and font white
23 span
24 Jaguar
25 head
26 ArrayIndexOutOfBoundsException
27 package
28 easy to learn
29 False
30 365
1 if syntax is incorrect
2 awk'BEGIN {FS=" "}{if($5=="Yes"){print $2,$4}}' product.txt
3 Display line 2 to 10 from file1
4 True (not got execueted as there is not BEGIN)
5 name="unix"
echo "Hello $name"
9 LENGTH()
10 SELECT *FROM Toddler Where NAME='A%'
14 ALTER TABLE table_name
ADD column_name datatype;
15 update Employee set designation=ITA where loaction is null
16 var carName="Honda City";
17 Object (type of var x={firstName:"TCS",lastName="ILP"};)
18 Number 16
19 Required
20 h6
21 on clikcking the "clickme ' linnk it will open google.com in parent frame
22 Background blue and font white
23 span
24 Jaguar
25 head
26 ArrayIndexOutOfBoundsException
27 package
28 easy to learn
29 False
30 365
👍6
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
public static void main(String args[] ) throws Exception {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
int n;
Scanner sc=new Scanner(System.in);
n=sc.nextInt();
Stationery[] f=new Stationery[n];
for(int i=0;i<n;i++){
int id=sc.nextInt();
int qty=sc.nextInt();
sc.nextLine();
String name=sc.nextLine();
int price=sc.nextInt();
//sc.nextLine();
f[i]=new Stationery(id,qty,name,price);
}
int chid=sc.nextInt();
Stationery ans=findStationeryWithMaximumPrice(f);
if(ans!=null){
System.out.println("id-"+ans.id);
System.out.println("quantity-"+ans.qty);
System.out.println("name-"+ans.name);
System.out.println("price-"+ans.price);
}
else{
System.out.println("No Stationery found with mentioned attribute");
}
Stationery ans1=searchStationeryById(f, chid);
if(ans1!=null){
System.out.println("id-"+ans1.id);
System.out.println("quantity-"+ans1.qty);
System.out.println("name-"+ans1.name);
System.out.println("price-"+ans1.price);
}
else{
System.out.println("No Stationery found with mentioned attribute");
}
}
public static Stationery findStationeryWithMaximumPrice(Stationery[] a)
{
Stationery ans=null;
if(a.length==0)return null;
int l=a.length;
int maxi=a[0].price;
for(int i=0;i<l;i++){
if((a[i].price)>maxi){
maxi=a[i].price;
ans=a[i];
}
}
return ans;
}
public static Stationery searchStationeryById(Stationery[] a,int id1)
{
Stationery ans1=null;
for(int i=0;i<a.length;i++){
if(a[i].id==id1){
ans1=a[i];
}
}
return ans1;
}
}
class Stationery {
int id;
int qty;
String name;
int price;
Stationery(int id,int qty,String name,int price){
this.id=id;
this.qty=qty;
this.name=name;
this.price=price;
}
}
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
public static void main(String args[] ) throws Exception {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
int n;
Scanner sc=new Scanner(System.in);
n=sc.nextInt();
Stationery[] f=new Stationery[n];
for(int i=0;i<n;i++){
int id=sc.nextInt();
int qty=sc.nextInt();
sc.nextLine();
String name=sc.nextLine();
int price=sc.nextInt();
//sc.nextLine();
f[i]=new Stationery(id,qty,name,price);
}
int chid=sc.nextInt();
Stationery ans=findStationeryWithMaximumPrice(f);
if(ans!=null){
System.out.println("id-"+ans.id);
System.out.println("quantity-"+ans.qty);
System.out.println("name-"+ans.name);
System.out.println("price-"+ans.price);
}
else{
System.out.println("No Stationery found with mentioned attribute");
}
Stationery ans1=searchStationeryById(f, chid);
if(ans1!=null){
System.out.println("id-"+ans1.id);
System.out.println("quantity-"+ans1.qty);
System.out.println("name-"+ans1.name);
System.out.println("price-"+ans1.price);
}
else{
System.out.println("No Stationery found with mentioned attribute");
}
}
public static Stationery findStationeryWithMaximumPrice(Stationery[] a)
{
Stationery ans=null;
if(a.length==0)return null;
int l=a.length;
int maxi=a[0].price;
for(int i=0;i<l;i++){
if((a[i].price)>maxi){
maxi=a[i].price;
ans=a[i];
}
}
return ans;
}
public static Stationery searchStationeryById(Stationery[] a,int id1)
{
Stationery ans1=null;
for(int i=0;i<a.length;i++){
if(a[i].id==id1){
ans1=a[i];
}
}
return ans1;
}
}
class Stationery {
int id;
int qty;
String name;
int price;
Stationery(int id,int qty,String name,int price){
this.id=id;
this.qty=qty;
this.name=name;
this.price=price;
}
}
👍3
Code For Me
import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String args[] ) throws Exception { /* Enter your code here. Read input from STDIN. Print output…
Java PRA 4 jan 2022 stationery searchmax
👍1
PYTHON MCQ JAN 17 FOLLOW @codeforme
6 ACCURATE AND ACESSIBLE
26 16
27 square bullets
Mango
Apple
Bannana
28 Pant
29 35
30 Onclick
31 class
32 javascript object
33 undefined
34 seafoodcosts160
35 46
36 set()
37 print(numbers[-2]) print(numbers[3])
38 Error
39 0 1
40 [[2], [2], [2], [2]]
41 ERROR
42 print(str.count('n'))
43 HELLO
44 Finally finished!
Finally finished!
45 [1, 2, 3, 4, 4, 5, 6]
46 <class 'tuple'>
Rosy
47 <class 'set'>
48 ['id01', 'id03', 'id10', 'id12', 'id12', 'id13']
49 10
50 dict_keys(['a', 'b', 'c'])
6 ACCURATE AND ACESSIBLE
26 16
27 square bullets
Mango
Apple
Bannana
28 Pant
29 35
30 Onclick
31 class
32 javascript object
33 undefined
34 seafoodcosts160
35 46
36 set()
37 print(numbers[-2]) print(numbers[3])
38 Error
39 0 1
40 [[2], [2], [2], [2]]
41 ERROR
42 print(str.count('n'))
43 HELLO
44 Finally finished!
Finally finished!
45 [1, 2, 3, 4, 4, 5, 6]
46 <class 'tuple'>
Rosy
47 <class 'set'>
48 ['id01', 'id03', 'id10', 'id12', 'id12', 'id13']
49 10
50 dict_keys(['a', 'b', 'c'])
Pra python options may be suffeld
17 <b>
18 the below output will be diplay in gree font
small
medium
large
19 Number is 16
20 h1
21 <link rel="styleshee" href="style.css">
22 font-style: italic;
23 10
24 Bage164
25 <img src="demo.png">
26 0 2
27 True
28 Inheritance
29 12 15 18
30Hello World
17 <b>
18 the below output will be diplay in gree font
small
medium
large
19 Number is 16
20 h1
21 <link rel="styleshee" href="style.css">
22 font-style: italic;
23 10
24 Bage164
25 <img src="demo.png">
26 0 2
27 True
28 Inheritance
29 12 15 18
30Hello World
Java PRA
1 ArrayOutOfBoundException
3 easy
4 False
6 var emp={id:"101",name="Suman",salary:"50000"};
7 11
8 True javascript can change sytle
9 / is used to end tag
10<input type="checkbox"
11 <b> is used for extra imp
13 item
14 linkgroup
18 Begin End
29 True( no BEGIN awk)
30 if[-f place.text]
1 ArrayOutOfBoundException
3 easy
4 False
6 var emp={id:"101",name="Suman",salary:"50000"};
7 11
8 True javascript can change sytle
9 / is used to end tag
10<input type="checkbox"
11 <b> is used for extra imp
13 item
14 linkgroup
18 Begin End
29 True( no BEGIN awk)
30 if[-f place.text]
👍1
Guys some people sharing fake screenshot or someone else solved testcase passed screenshot don't believe them. They will scam you 100%. Remember if you send money to someone then u will never get your money back. Once money sent means Money gone... (𝐁𝐞𝐬𝐭 𝐰𝐚𝐲 𝐭𝐨 𝐜𝐡𝐞𝐜𝐤 𝐢𝐟 𝐬𝐨𝐦𝐞𝐨𝐧𝐞 𝐢𝐬 𝐠𝐞𝐧𝐮𝐢𝐧𝐞 𝐭𝐞𝐥𝐥 𝐭𝐡𝐞𝐦 𝐭𝐨 𝐬𝐨𝐥𝐯𝐞 𝐲𝐨𝐮𝐫 𝐦𝐨𝐜𝐤 𝐢𝐫𝐚 𝐨𝐫 𝐬𝐨𝐦𝐞 𝐭𝐞𝐬𝐭 𝐟𝐫𝐞𝐞 𝐚𝐧𝐝 𝐜𝐡𝐞𝐜𝐤 𝐭𝐡𝐞𝐫𝐞 𝐫𝐞𝐜𝐨𝐫𝐝 𝐢𝐧 𝐠𝐫𝐩 𝐡𝐢𝐬 𝐚𝐜𝐜𝐨𝐮𝐧𝐭 𝐢𝐬 𝐧𝐞𝐰 𝐨𝐫 𝐨𝐥𝐝. 𝐭𝐡𝐞 𝐩𝐞𝐨𝐩𝐥𝐞 𝐰𝐡𝐨 𝐡𝐢𝐝𝐞 𝐭𝐡𝐞𝐫𝐞 𝐢𝐝𝐞𝐧𝐭𝐢𝐭𝐲 𝐥𝐢𝐤𝐞 𝐜𝐨𝐝𝐞𝐡𝐞𝐥𝐩 𝐜𝐨𝐝𝐞𝐡𝐮𝐛 𝐞𝐱𝐚𝐦 𝐡𝐞𝐥𝐩𝐞𝐫 𝐬𝐮𝐜𝐡 𝐤𝐢𝐧𝐝 𝐨𝐟 𝐮𝐬𝐞𝐫𝐧𝐚𝐦𝐞 𝐜𝐚𝐧 𝐛𝐞 𝐟𝐚𝐤𝐞)
𝐂𝐡𝐞𝐚𝐭𝐞𝐫'𝐬 𝐛𝐥𝐚𝐜𝐤𝐥𝐢𝐬𝐭
𝐓𝐡𝐞𝐬𝐞 𝐚𝐫𝐞 𝐭𝐡𝐞 𝐧𝐚𝐦𝐞𝐬 𝐨𝐟 𝐩𝐞𝐨𝐩𝐥𝐞 𝐰𝐡𝐨 𝐨𝐰𝐞𝐝 𝐦𝐨𝐧𝐞𝐲 𝐚𝐧𝐝 𝐭𝐡𝐞𝐧 𝐛𝐥𝐨𝐜𝐤𝐞𝐝 𝐦𝐚𝐧𝐲 𝐮𝐬𝐞𝐫𝐬.
1. S Naveen Kumar 600+500rs (your exam)
2. Shalu thakur 500++rs (Steven Skyler)
𝐓𝐡𝐞𝐬𝐞 𝐚𝐫𝐞 𝐭𝐡𝐞 𝐧𝐚𝐦𝐞𝐬 𝐨𝐟 𝐩𝐞𝐨𝐩𝐥𝐞 𝐰𝐡𝐨 𝐨𝐰𝐞𝐝 𝐦𝐨𝐧𝐞𝐲 𝐚𝐧𝐝 𝐭𝐡𝐞𝐧 𝐛𝐥𝐨𝐜𝐤𝐞𝐝 𝐦𝐚𝐧𝐲 𝐮𝐬𝐞𝐫𝐬.
1. S Naveen Kumar 600+500rs (your exam)
2. Shalu thakur 500++rs (Steven Skyler)