Core Computer Science Interview Questions expected in top most companies.
Algorithm and Computer Programming Languages Interview Questions.
For any Computer Science Graduate seeking a job, algorithm and programming language knowledge is a must. C, C++ are the preferred languages on which questions will be asked. Please use the comment section to answer.
- Write a C Program module for calculating the factorial of a number using/without using*recursion?
- Why is it suggested not to use malloc() or calloc() in C++ for memory allocation?
- Can array name itself be used as a pointer? How?
- Write a C Program module for finding the first n terms in a Fibonacci Series using/without using recursion?
- Find the GCD of two numbers using C/C++?
- What do you know about Type Casting?
- What’s the use of pointers? Any disadvantages?
- What is the difference between basic building blocks in C and C++?
- What are time complexity and space complexity?
- What is the use of Recursion? Is it compiler-friendly?
- How do you find out if a number is a power of 2?
- Is pointer a variable?
- Why java does not contain pointers?
- What are constructors and destructors? Then, what do you mean by Virtual Destructors?
- What do you mean by malloc() in C? Then, what is dealloc()? (Beware, the interviewer may mislead you by invalid keywords or so)
- Write a C Program module to reverse a string, without using string.h library functions?
- What is cascading of operator?
- What are the basic features of OOP? (Students are advised to study the details of all the basic features of OOP, as this is a very much repeated question in almost all technical interviews. Hence, in this document, further questions regarding each feature of OOP is not included – it’s to be learned as such)
- Differentiate between POP and OOP?
- What are the differences between Syntax, Logical and Run Time errors in C?
- How to convert decimal number to binary? (You need not write the code module, but explain the algorithm)
- Why is the complexity of an algorithm to be determined?
- How the compiler make difference between C and C++?
- What do you mean by the robustness of a language?
- What’s the use of Scope resolution operator?
- What is the general strategy for Markov Algorithm?
- How many temporary variables is essential for swapping two integer variables? (Usually,we use one temporary variable; but it’s not essential. Hence the answer is ZERO. Find out how you can swap without using temporary variables)
- What is the difference between = and == in C?
- How many but combinations are possible in a byte?
- What are function overloading and operator overloading? Which concept of OOP do they comply with?
- What are friend functions in Class?
- Why do we declare some functions are virtual in Class?
- How do you explain to a kid the concept of Classes and Objects? -OR- Can you find an analogy of Classes and Objects in the real world?
- What shall be the output of the following code:
- int i=50; printf(“%d,%d”,i,i++);
- (Yes, sometimes, this also has happened. When they feel that the candidate is appealing,they will give you a small program code in writing, which be tricky in nature. In the above question, the answer is 51,50 which may be wrongly-attempted by the candidates)
- Write a C Program module to find the numbers between 10 and 99 where the number is thrice the sum of its digits?
- What is Virtual Destructor?
- Can a pointer be pointed to by another pointer?
- What if I say an 1-D array of pointer is enough to point to a 2-D array of numbers, will you agree with me? Explain.
- Can you give me an example for a tertiary operand used in C?
- Why we follow top down approach in C-language and bottom up approach in C++?Explain in detail.
- Write a function in C/C++ to reverse the words in the sentence, for example "I am from CEC" becomes "CEC from am I"
- Can you give me an instance where we may need to resort to 3-D array representation,instead of confining to 2-D?
No comments :