Algorithm and Computer Programming Languages Questions

11/23/2012 No Comment

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.
  1. Write a C Program module for calculating the factorial of a number using/without using*recursion? 
  2. Why is it suggested not to use malloc() or calloc() in C++ for memory allocation? 
  3. Can array name itself be used as a pointer? How? 
  4. Write a C Program module for finding the first n terms in a Fibonacci Series using/without using recursion? 
  5. Find the GCD of two numbers using C/C++? 
  6. What do you know about Type Casting? 
  7. What’s the use of pointers? Any disadvantages? 
  8. What is the difference between basic building blocks in C and C++? 
  9. What are time complexity and space complexity? 
  10. What is the use of Recursion? Is it compiler-friendly? 
  11. How do you find out if a number is a power of 2?
  12. Is pointer a variable? 
  13. Why java does not contain pointers? 
  14. What are constructors and destructors? Then, what do you mean by Virtual Destructors? 
  15. What do you mean by malloc() in C? Then, what is dealloc()? (Beware, the interviewer may mislead you by invalid keywords or so) 
  16. Write a C Program module to reverse a string, without using string.h library functions? 
  17. What is cascading of operator? 
  18. 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) 
  19. Differentiate between POP and OOP? 
  20. What are the differences between Syntax, Logical and Run Time errors in C? 
  21. How to convert decimal number to binary? (You need not write the code module, but explain the algorithm) 
  22. Why is the complexity of an algorithm to be determined? 
  23. How the compiler make difference between C and C++? 
  24. What do you mean by the robustness of a language? 
  25. What’s the use of Scope resolution operator? 
  26. What is the general strategy for Markov Algorithm? 
  27. 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) 
  28. What is the difference between = and == in C? 
  29. How many but combinations are possible in a byte? 
  30. What are function overloading and operator overloading? Which concept of OOP do they comply with? 
  31. What are friend functions in Class? 
  32. Why do we declare some functions are virtual in Class? 
  33. 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? 
  34. What shall be the output of the following code: 
  35. int i=50; printf(“%d,%d”,i,i++); 
  36. (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) 
  37. Write a C Program module to find the numbers between 10 and 99 where the number is thrice the sum of its digits? 
  38. What is Virtual Destructor? 
  39. Can a pointer be pointed to by another pointer? 
  40. 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. 
  41. Can you give me an example for a tertiary operand used in C? 
  42. Why we follow top down approach in C-language and bottom up approach in C++?Explain in detail. 
  43. Write a function in C/C++ to reverse the words in the sentence, for example "I am from CEC" becomes "CEC from am I" 
  44. 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 :

 

Aired | The content is copyrighted and may not be reproduced on other websites. | Copyright © 2009-2016 | All Rights Reserved 2016

Contact Us | About Us | Privacy Policy and Disclaimer