Question
A C function print_matrix(int rows, int cols, int matrix[rows][cols]) is designed to print a matrix. #include void print_matrix(int rows, int cols, int matrix[rows][cols]) { for (int i = 0; i <= rows; i++) { // Potential bug here for (int j = 0; j < cols; j++) { printf("%d ", matrix[i][j]); } printf("\n"); } } If print_matrix(2, 3, my_matrix) is called for a 2x3 matrix (rows 0, 1; cols 0, 1, 2), what will be the most likely outcome?
More IT Operating System Questions
- The time at which the process arrive at the system is called as :
- Which data structure is most commonly used to efficiently implement a priority queue?
- A processor uses a write-back cache policy rather than write-through. What is the primary trade-off this design choice introduces?
- In the context of file systems, what is the primary purpose of an inode?
- Which of the following statements accurately describes the purpose of unit testing in software development?
- In a code flow involving frequent insertions and deletions, which type of Binary Search Tree is preferred to guarantee O(log n) time complexity for these o...
- Which access specifier makes members accessible only within the class itself?
- A queue initially empty undergoes the following sequence of operations: 1. enqueue(10) 2. enqueue(20) 3. dequeue() 4. enqueue(30) 5. dequeue() 6...
- In dimensional modeling, what is a fact table?
- Which of the following best describes the Spiral Model in software development?
Hey! Ask a query
Please enter email id
The email must be a valid email address.
Please enter Mobile Number
Please enter valid Mobile Number
Please enter your Doubt
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
- 200 Questions with Detailed Solutions
- Section-wise Coverage (GA, English, Quant & Reasoning)