System Programming is the activity of programming system software. A system programmer is a technical person who writes programs and performs many technical tasks that integrate vendors’ software. He or she also acts as technical advisors to systems analysts, application programmers and operations personnel. A system programmer is also called a Software Engineer.
Listed below are some common interview questions that come up again and again during interviews for the post of System Programmer:
1. Write a function that returns the factorial of a number.
It is a very basic technical question asked by the interviewer to check the fundamental knowledge of the programmer. The probable answer to this question is as under:
#include<iostream>
using namespace std;
/* factorial function –recursive*/
int fact(int n){
if (n==0)
return 1;
n=n*fact(n-1);
return n;
}
int main() {
int n=5;
cout << “Factorial of number ” << n << ” is : ” << fact(n) << endl;
return 0;
}
2. How will you reverse a singly linked list recursively? The function prototype is node * reverse (node *)
The probable answer to this question is as under:
node * reverse (node * n) { node * m ; if (! (n && n -> next)) return n ;
m = reverse (n -> next) ;
n -> next -> next = n ;
n -> next = NULL ; return m ; }
3. You are given only putchar. How will you write a routine putlong that prints out an unsigned long in decimal?
It is another technical question. You can answer this question in following way:
void putlong(unsigned long x)
{
// we know that 32 bits can have 10 digits. 2^32 = 4294967296
for (unsigned long y = 1000000000; y > 0;
y /= 10)
{
putchar( (x / y) + ’0′);
x = x % y;
}
}
4. Why did you left your previous job?
This is a very sensitive question. Never abuse or disregard your previous employer. You can politely answer this question by saying that there was no growth scope in my previous company that’s why I left it. I am looking for a company with long term growth opportunities. You have a brand name and I think I will get an excellent growth opportunity in your company.
These are some of the frequently asked interview questions. I hope now you will not face any problem in answering the above questions.