0% found this document useful (0 votes)
45 views3 pages

C Interview Questions

The document contains 40 questions related to various programming concepts in C++ such as classes, functions, data structures, algorithms, variables and memory. Some of the key questions asked are: What is the difference between structures and classes? How can deadlock be prevented? What is the best algorithm to sort a large list of words? What are pointers and how are they used? What is the maximum size an array can hold?

Uploaded by

Sai Ram
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views3 pages

C Interview Questions

The document contains 40 questions related to various programming concepts in C++ such as classes, functions, data structures, algorithms, variables and memory. Some of the key questions asked are: What is the difference between structures and classes? How can deadlock be prevented? What is the best algorithm to sort a large list of words? What are pointers and how are they used? What is the maximum size an array can hold?

Uploaded by

Sai Ram
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1. Which is your favourite language? 2. Basic concepts of C++ like this pointer, function overloading 3.

Write a program to add two numbers in C++ using classes class class1 { public : void sum1(int,int); }; void class1::sum1(int C,int D) //Note here { int sum; sum=C+D; cout<<"sum="<sum; } void main() { int a=1,b=2; class1 p; p.sum1(a,b); getch(); }

4. Tell me something about abstract classes? 5. Tell something about deadlock? 6. How can we prevent deadlock? 7. What is Insertion sort, selection sort, bubble sort( basic differences among the functionality of the three sorts and not the exact algorithms) 8. What is Doubly link list? 9. What is Deadlock and how it can be avoided? 10. Write a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors. 11. What is the best algorithm to sort out unique words from a list of more than 10 million words(1 crore+)? we need the best technique in the terms of execution time.

12. What is scope of a variable? (LOLZ) 13. What is data Abstraction? and give example 14. How to swap two numbers with out using temp variable 15. What is importance of data sturture in a programming language? 16. What is the Maximum Size that an Array can hold? 17. What is your strongest programming language (Java, ASP, C, C++, VB, HTML,C#, etc.)? 18What does static variable mean? 19.What is a pointer? 20.What is a structure? 21.What are the differences between structures and arrays? 23.In header files whether functions are declared or defined? 24.What are the differences between malloc() and calloc()? 25.What are macros? what are its advantages and disadvantages? 26.Difference between pass by reference and pass by value? 28.What is static identifier? 29.Where are the auto variables stored? 30.Where does global, static, local, register variables, free memory and C Program instructions get stored? 31.Difference between arrays and linked list? 32.What are enumerations? 33.What is a class? 34.What is an object? 35.What is the difference between an object and a class? 36.What is the difference between class and structure?

37.What is public, protected, private? 38.What are virtual functions? 39.What is friend function? 40.What is a scope resolution operator?

You might also like