Siemens Previous Years Solved Sample Placement Papers
-
Static member functions can access "this" pointer:
- true
- false
- compiler dependent
- none
-
Main() { char arr[12]; printf("%d", sizeof(arr)); }
- 24
- 12
- 36
- 2
-
char *p; short i; long l; (long)i = l;
- both 1 & 2 are correct
- both 1 & 2 are incorrect
- Statement 1 is correct
- Statement 2 is correct
-
Main() { int I; I = 010; printf("%d", I); }
- 2
- 8
- 10
- 4
-
Main() { const int val = 5; const int *ptrval; ptrval = &val; *ptrval = 10; printf("%d", val); }
- 5
- 10
- Garbage
- Error
-
What will print out?
main() { char *p1 = "name"; char *p2; p2 = (char*)malloc(20); memset(p2, 0, 20); while(*p2++ = *p1++); printf("%s\n", p2); }
Answer: empty string. -
Which of the following operators can't be overloaded:
- ==
- ++
- !
- <=
- Semaphore variable is different from an ordinary variable by: Mutual exclusion and signaling mechanism.
-
After calling swap, what are the values of x & y?
swap(int x, y) { int temp; temp = x; x = y; y = temp; } main() { int x = 2, y = 3; swap(x, y); }
Answer: x = 2, y = 3 (no change due to call by value). -
Static variable will be visible in:
- function in which they are defined
- module in which they are defined
- all the program
- none
-
Unix system is:
- multi-processing
- multi-processing, multi-user
- multi-processing, multi-user, multitasking
- multi-user, multitasking
-
TCP/IP can work on:
- ethernet
- token ring
- a & b
- none
-
Automatic variables are destroyed after function ends because:
- Stored in swap
- Stored in stack and popped out after function returns
- Stored in data area
- Stored in disk
OS Questions
-
A page fault occurs when:
- system crashes due to lack of memory
- page referred belongs to a different program
- request for the page currently made is not in memory
- 1 & 2
-
The basic criteria of selecting a page replacement algorithm for virtual memory management is:
- low page fault rate
- high page fault rate
- high page modification rate
- low page size
-
Which of the following is not a scheduling algorithm:
- FCFS scheduling
- SJF scheduling
- Priority based scheduling
- Shortest fit scheduling
-
Which of the following statements is true on demand paging:
- used to increase speed of memory access
- causes external fragmentation
- technique to manage existing main memory efficiently
- allows variable sized segments
-
A multiprocessor system is:
- loosely coupled system
- tightly coupled system
- distributed system
- none
-
What is mutex:
- binary semaphore
- multitasking facility
- bit addressable memory
- register