Siemens Previous Years Solved Sample Placement Papers
-
void main(void) { int y = 128; const int x = y; printf("%d", x); }
- 128
- Garbage
- 0
- Error
-
When do preprocessor directives get executed:
- before compilation
- during compilation
- after compilation
- none
-
Which kind of function can access private data members:
- friend functions
- private member functions
- public member function
- all
-
Which of the following will be automatically generated by the compiler:
- default constructor, default destructor, copy constructor, assignment operator
- Default constructor, copy constructor
- Address operator, assignment operator
- B & C
-
Difference between C++ struct and C++ class is:
- both are same
- Struct defaults to public member access while class defaults to private member access
- Struct defaults to public base class inheritance while class defaults to private base class inheritance
- B & C
-
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
-
void main(void) { int x = 2; int y = 4; cout << x++ << --y; cout << x << y; }
- 2 4
3 4 - 3 3
3 4 - 2 3
2 4 - 2 3
3 3
- 2 4
OS Questions for Technical Interviews
-
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