Question
Consider the following C code: #include #include int main() { char str1[] = "Hello"; char str2[] = {'W', 'o', 'r', 'l', 'd', '\0', 'X'}; char str3[] = {'C', 'o', 'd', 'e'}; // No null terminator printf("%zu %zu\n", strlen(str1), strlen(str2)); // What happens if strlen(str3) is called? // printf("%zu\n", strlen(str3)); return 0; } What will be the output of the printf statement, and what would be the behavior if strlen(str3) were uncommented and executed?
More IT Operating System Questions
- You are using Python's built-in dict to store custom objects. class MyObject: def __init__(self, value): self.value = value # Missi...
- Which of the following best describes the primary purpose of inheritance in OOP?
- What is a 'context switch' in operating systems?
- What will be name given to the path where the start node will become the end node ?
- For a sparse matrix, which representation method is generally preferred to save memory and improve computational efficiency?
- Consider the following code: let data = [1, 2, 3]; function modifyArray(arr) { arr.push(4); arr = [5, 6]; // Reassigns local ...
- A critical section in multithreaded programming is a code segment that:
- For the system showm below calculate the transfer function.
- Which traversal method of a Binary Search Tree will always output elements in ascending order?
- A process is currently in the "Running" state. If its allocated time slice expires, to which state will it typically transition?
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)