What is the output of: System.out.println(310) in Java?
Both operands are integers, so integer division is performed: 310 = 3 (truncated)
What is the main purpose of normalization in databases?
Database normalization organizes data to minimize redundancy and improve data integrity
Which of the following is a characteristic of Microservices architecture?
Microservices architecture emphasizes small, independent services that communicate through APIs
What does REST API stand for?
REST stands for Representational State Transfer, an architectural style for web services
In a relational database, a Primary Key must be:
A Primary Key uniquely identifies each record and cannot contain null values
Advertisement
What will be the output? int x = 5; System.out.println(++x + x++);
++x increments x to 6 first, then x++ uses 6 and increments to 7. So 6 + 6 = 12
Which of the following is an advantage of Cloud Computing?
Cloud computing provides scalability, flexibility, and pay-as-you-go pricing models
If a number is multiplied by 0.5 and then by 4, what percentage of the original number is the result?
Let original = x. After operations: x × 0.5 × 4 = 2x = 200% of x
In a class, the ratio of boys to girls is 3:2. If there are 45 students in total, how many girls are there?
Boys:Girls = 3:2, total parts = 5. Girls = (52) × 45 = 18
A password must contain at least one uppercase letter, one digit, and be at least 8 characters long. Which is valid?
ABC12345 has uppercase (A,B,C), digit (1,2,3,4,5), and is 8+ characters long
What is the difference between var, let, and const in JavaScript?
var has function scope, let/const have block scope. const prevents reassignment but let allows it
In the number 52,347, what is the place value of 3?
In 52,347, the digit 3 is in the hundreds place, so its place value is 300
What is 15% of 80?
15% of 80 = 0.15 × 80 = 12
If a car travels at 60 km/h for 2 hours and 40 km/h for 3 hours, what is the average speed?
Total distance = 60×2 + 40×3 = 120 + 120 = 240 km. Total time = 2 + 3 = 5 hours. Average = 5240 = 48 km/h
If the cost price of an item is Rs. 400 and it is sold at a loss of 15%, what is the selling price?
Loss = 15% of 400 = 60. Selling Price = 400 - 60 = Rs. 340
Two pipes A and B can fill a tank in 12 hours and 18 hours respectively. If both pipes are opened together, how long will it take to fill the tank?
Rate of A = 121 per hour. Rate of B = 181 per hour. Combined rate = 121 + 181 = 363 + 362 = 365. Time = 536 = 7.2 hours
A person spends 30% of his income on food, 40% on rent, and 20% on utilities. If his remaining income is Rs. 5,000, what is his total income?
Percentage spent = 30 + 40 + 20 = 90%. Remaining = 10% = 5,000. Total income = 5,000 × 10 = Rs. 50,000
A shopkeeper marks up goods by 50% and gives a discount of 20%. What is his profit percentage?
Let CP = 100. Marked Price = 150. After 20% discount: SP = 150 × 0.8 = 120. Profit = 20%
A bag contains 5 red balls, 7 blue balls, and 8 green balls. What is the probability of drawing a red ball?
Total balls = 5 + 7 + 8 = 20. Probability of red = 205 = 41
If a sequence is 2, 5, 10, 17, 26, what is the next number?
Differences: 3, 5, 7, 9... next difference is 11. So 26 + 11 = 37