C Language Interview Questions Answers Pdf

admin

1) Explain what is a class in C++?

  1. C Interview Question And Answers
  2. C Language Interview Questions And Answers For Freshers

A class in C++ can be defined as a collection of function and related data under a single name. It is a blueprint of objects. A C++ program can consist of any number of classes.

2) How can you specify a class in C++?

By using the keyword class followed by identifier (name of class) you can specify the class in C++.
Inside curly brackets, body of the class is defined. It is terminated by semi-colon in the end.

IndiaBIX provides you lots of fully solved C Programming interview questions and answers with explanation. Lots of mock tests (sample test, model test) with detailed explanation are given and it would be easy to understand. All students, freshers can download C Programming quiz questions with answers as PDF files and eBooks. C Programming interview questions and answers section for. The C Language Basics. Here is a list of questions (and the answers to those questions) that will help you get a feel for a candidate's proficiency with C#. Top C Programming Interview Questions: C programming language was developed in between 1969 and 1973 by Dennis Ritchie at Bell Labs. He uses this new programming language for re-implement UNIX operating system. C is a high-level structured oriented programming language use to general purpose programming requirements.

Basic c interview questions
2
4
6
8
10
12
Using namespacestd;
main()
inta=21;
intc;
cout<<Line1-Value ofcis:<<c<<endl;
}

It will give the output as 31 when you run the command

13) What is the C-style character string?

The string is actually a one-dimensional array of characters that is terminated by a null character ‘0’.

For example, to type hello word

2
4
6
8
Using namespacestd;
intmain()
Cout<<Hello guru99<<endl;
}

17) Explain what is C++ exceptional handling?

The problem that arises during execution of a program is referred as exceptional handling. The exceptional handling in C++ is done by three keywords.

• Try: It identifies a block of code for which particular exceptions will be activated
• Catch: The catch keyword indicates the catching of an exception by an exception handler at the place in a program
• Throw: When a problem exists while running the code, the program throws an exception

18) Explain what is data encapsulation in C++?

Encapsulation is an object oriented programming concept (oops) which binds together the data and functions. It is also referred as data hiding mechanism.

19) Mention what are the types of Member Functions?

The types of member functions are

• Simple functions
• Static functions
• Const functions
• Inline functions
• Friend functions

20) Mention what are the decision making statements in C++? Explain if statement with an example?

The decision making statements in C++ are

• if statement
• switch statement
• conditional operator

For example, we want to implement if condition in C++