Interview questions

C interview questions – page 45

2,094 questions. Tap “Show answer” to check yourself.

  1. Explain what is object oriented programming language?

  2. Main(){if (!(1&&0)){printf("OK I am done.");}else{printf("OK I am gone.");}}

  3. Difference between calloc and malloc ?

  4. Output of this Programme please?main(){int a[]={2,4,6,8,10};int i;change(a,5);for(int i=0;i<=4;i++)printf(" %d", a[i]);}change(int *b,int n){int i;for(i=0;i *(b+i) = *(b+i)+5;}sytaxis correct? was asked i a test

  5. What is the syntax for calling an overloaded constructor within a constructor (this() and constructorname() does not compile)?

  6. What are the examples of encapsulation?

  7. What is the difference between a struct and a class in C#?

  8. Is it possible to have different access modifiers on the get/set methods of a property?

  9. What is the difference between compile time error and run time error?

  10. Code To draw a three dimensional graph using c graphics?

  11. Q1.write C++ program to accept a string and display ascii value letter by letter then display sum of all ascii values.Q2.write C++ program to accept 20 nos and then display max & min.

  12. How can I get around scope problems in a try/catch?

  13. How do I convert a string to an int in C#?

  14. Output of the following programvoid main(){unsigned i;i=100*400;printf(

  15. Explain about encapsulation?

  16. Can you inherit multiple interfaces?

  17. What is the data provider name to connect to Access database?

  18. What does the parameter Initial Catalog define inside Connection String?

  19. Does C# support try-catch-finally blocks?

  20. What is friend function and this operator in c++?

  21. Explain about the relationship between object oriented programming and databases?

  22. What is an interface class?

  23. Explain about UML?

  24. Give me Change syntax of color change (1)Background color(2)font color(3)size of font

  25. What is the difference between the System.Array.CopyTo() and System.Array.Clone()?

  26. What do you mean by binding of data and functions?

  27. Why the six operators can't be overloaded? b)Why main() is a userdefined function?

  28. How to write a C program to find the power of 2 in a normal way and in single step?

  29. How can i find size of a variable without using sizeof() operator?

  30. #define int charmain(){int i=65;printf("sizeof(i)=%d",sizeof(i));}

Companies that ask C questions