Back to Exam Dashboard

Practice Set 2

Success Primer Exam 2026 Question Set

Programming#1

Predict the output: var x = 5 ^ "0"; document.write(parseInt(x));

A
Compile Time Error
B
NaN
C
0
D
5

JavaScript coerces "0" to 0 for bitwise operations. 5 XOR 0 equals 5.

Programming#2

Which command is used to find out the version of jquery?

A
$.ui.version
B
$.ui:version
C
$:ui.version

$.ui.version is the property specifically for the jQuery UI library version.

Programming#3
Logic Block
1
Predict the output of the program: public class Test { public static void main(String[] args) { int n, temp = 0; int[] num_ar = new int[]{49, 56, 23, 16, 9, 34}; int[] temp_ar = new int[num_ar.length]; for(int i=0; i<num_ar.length; i++) { temp_ar[i] = num_ar[i]; } for(int i=0; i<num_ar.length; i++) { for(int j=0; j<num_ar.length; j++) { if(temp_ar[i] < temp_ar[j]) { temp = temp_ar[i]; temp_ar[i] = temp_ar[j]; temp_ar[j] = temp; } } } for(int i=0; i<num_ar.length; i++) { for(int j=0; j<num_ar.length; j++) { if(temp_ar[i] == num_ar[j]) { System.out.print(j + " "); } } } } }
A
4, 5, 2, 1, 0, 3
B
Compile time error
C
4, 3, 2, 5, 0, 1
D
Runtime exception

The code sorts elements ascending and prints their original indices in num_ar.

Programming#4
Logic Block
1
Predict the output of the program: public class JavaIntroduction { String name; int id; double salary; JavaIntroduction(String name, int id, double salary) { this.name = name; this.id = id; this.salary = salary; } JavaIntroduction(JavaIntroduction s) { id = s.id; name = s.name; salary = s.salary; } void display() { System.out.println(name + " " + id + " " + salary); } public static void main(String[] args) { JavaIntroduction s1 = new JavaIntroduction("Harish", 256, 120000); JavaIntroduction s2 = new JavaIntroduction(s1); s1.display(); s2.display(); } }
A
Harish 256
B
Harish 256 120000.0 (printed twice)
C
null null
D
Compile time error

Demonstrates a copy constructor copying field values from s1 to s2.

Programming#5

Which of the following options are invalid variable names in Java?

A
$char
B
1MyNumber
C
case
D
_int

Java variables cannot start with a number or use reserved keywords like 'case'.

Programming#6

How can we find the length of a string in Java?

A
length()
B
size()
C
len
D
length

In Java, String length is retrieved via the length() method.

AWS Services#7

Which AWS service provides scalable cloud storage with a pay-as-you-go pricing model?

A
Amazon S3
B
Amazon EC2
C
Amazon RDS
D
Amazon Lambda

Amazon S3 is an object storage service built for high scalability and cost-efficiency.

AWS Services#8

What AWS service provides a fully managed and scalable container orchestration service?

A
Amazon ECS
B
Amazon RDS
C
Amazon Lambda
D
Amazon SNS

Amazon ECS is a managed service used to run and scale containerized applications.

AWS Services#9

Which AWS service provides virtual servers in the cloud?

A
Amazon S3
B
Amazon EC2
C
Amazon CloudTrail
D
AWS Glue

EC2 stands for Elastic Compute Cloud, providing virtualized processing power.

AWS Services#10

Which AWS service is designed for data warehousing and business intelligence applications?

A
Amazon S3
B
Amazon Redshift
C
Amazon DynamoDB
D
Amazon EC2

Redshift is a high-performance data warehouse service for large-scale analytics.

AWS Services#11

What does AWS IAM primarily help you manage?

A
Application logs
B
User permissions and access control
C
Database backups
D
API throttling

IAM is used to manage identities and restrict resource access.

AWS Services#12

In AWS, what is the key difference between an EC2 instance store and Amazon EBS?

A
EC2 instance store provides higher durability
B
EC2 instance store data is ephemeral (lost on termination), while EBS data persists
C
EC2 instance store offers better performance for random I/O
D
EC2 instance store is for long-term storage, EBS for temporary

Instance store data is lost when instance is stopped/terminated; EBS data is persistent.

Comprehensive Assessment#13

Which two statements are equivalent? 1. 16*4 2. 16>>2 3. 16/2^2 4. 16>>>2

A
1 and 2
B
2 and 4
C
3 and 4
D
1 and 3

Both signed (>>) and unsigned (>>>) right shifts of 16 by 2 bits result in 4.

Comprehensive Assessment#14

In language like C, we are able to assign a char value to int and also a float value to int without doing explicit conversion. This property is termed as _______.

A
Strongly Typed
B
Weakly Typed
C
Partially Typed
D
Fully Typed

Weakly typed languages allow implicit type conversions without explicit casting by the programmer.

Fundamentals#15

Which technology underlies the functionality of generative AI models like GPT-3?

A
Blockchain
B
Neural Networks
C
Quantum Computing
D
RFID Technology

Generative AI models like GPT-3 are based on transformer architectures, a type of deep neural network.

Fundamentals#16

Which statement is true about dataset requirements for effective generative AI training?

A
Small datasets are always sufficient
B
Large and diverse datasets improve output quality
C
Datasets are optional for training
D
Models perform better with limited examples only

Diversity prevents bias and allows the model to generalize better across different prompts.

Fundamentals#17

What is a current limitation of generative AI models?

A
They cannot generate any form of media
B
They independently create proven scientific theories
C
They require human guidance for interpretation and validation
D
They do not rely on computational power

AI requires human oversight to correct hallucinations and ensure factual accuracy.

Database Queries#18

Which keyword is used to retrieve unique values in a SELECT statement in MySQL SQL?

A
UNIQUE
B
DISTINCT
C
DIFFERENT
D
None of the given options

DISTINCT is the standard SQL keyword for removing duplicate rows from a result set.

Database Queries#19

_______ is the type of JOIN which join the table with itself.

A
Self Join
B
Equi Join
C
Non Equi Join
D
Outer Join

A self join allows a table to be joined with itself, often used for hierarchical data.

Database Queries#20

Which query will delete the records of customers who ordered more than one item?

A
delete from customers where exists (select customer_id from orders where customers.customer_id=orders.customer_id group by customer_id having count(order_id)>1);
B
delete from orders where count(order_id)>1;
C
delete from customers where not exists (...)
D
delete from customers where exists (... group by customer_id)

Uses a correlated subquery to identify customers with multiple entries in the Orders table.

Key Topics to Study

Based on our question bank analysis, master these concepts to score high in Practice Set 2.

Watch Walkthroughs!