Skip to main content

Important Introduction to Programming Short Questions

Chapter: 13
Question 1:
How do you determine the limits of triangles in matrix transposition?
Answer: The limits are determined by starting the inner loop from the current row number to avoid re-swapping already swapped elements.
Chapter: 13
Question 2:
What is a transpose of a matrix?
Answer: The transpose of a matrix involves interchanging its rows and columns, making the first row the first column, and so on.
Chapter: 13
Question 3:
What is the design recipe in programming?
Answer: The design recipe is a systematic approach to problem-solving that includes analyzing the problem, designing a solution, and then implementing and testing the program.
Chapter: 13
Question 4:
What is the main problem discussed in the salary calculation example?
Answer: The problem is identifying employees who, due to tax brackets, take home less salary than colleagues with slightly lower gross salaries but lower tax rates.
Chapter: 13
Question 5:
How do you determine unlucky employees in the salary problem?
Answer: Unlucky employees are those who, despite having a higher gross salary, take home less net salary due to falling into a higher tax bracket.
Chapter: 13
Question 6:
Why do we use a two-dimensional array in the salary problem?
Answer: A two-dimensional array is used to store both the gross and net salaries of employees, allowing easy comparison and calculation.
Chapter: 13
Question 7:
What is the significance of interface design in the salary problem program?
Answer: A good interface design ensures that users understand what inputs are required and guides them through the process smoothly.
Chapter: 13
Question 8:
How is the tax calculated for different salary brackets in the example?
Answer: The tax is calculated based on predefined brackets, with increasing percentages as salary increases: 0% for up to Rs. 5,000, 5% for Rs. 5,001 to Rs. 10,000, and so on.
Chapter: 14
Question 9:
What is a pointer?
Answer: A pointer is a special type of variable that stores a memory address rather than a value.
Chapter: 14
Question 10:
How does direct reference differ from indirect reference?
Answer: Direct reference refers to accessing the value of a variable directly by its name, while indirect reference involves accessing the value via the memory address stored in a pointer.