Thursday, 8 September 2016

C Programming
Interview Questions And Answers

Candidates who are preparing for interviews may check here C
Programming Interview Questions And Answers that Updated For Freshers/Experienced.
C language is the mostly used language and also used to clear the programming
concept. That’s why, company always start with C Programming Interview
Questions and Answers for Freshers. Lots of aspirants every year appear for
various interviews but may face complication. So, if too nervous then prepare
here with such top updated C Programming Interview Questions and Answers.

To qualify or successfully crack such Interviews candidates requires
proper guidance. Interview session for a technical person is really hard to
compete. In technical Interview the questions are based on the basic language
that is required in the job… let’s explore more;

*C is developed by Dennis Ritchie and C++ developed by
Bjarne Stoustrup.

Ques 4:What is difference between
declaration and definition?

Ans. – Declaration means either a variable or
function that will use in the program is mentioned with data type (declared).
Definition means assigning the value to the declared variable or defining the
block of function that is declared. We can declare and define any variable or
function at the same time also.

Ans. – A pointer that doesn’t points anything is
null pointer. We can also define the null pointer with using macro NULL. Some
of the programmer prefers to use 0 instead of NULL.

Ques 9:What will be the output if we write
printf (“%d”);?

Ans. – It will give us a garbage value. When we
write printf (“%d”,x); then it prints the value of x but in this case there is
nothing after %d so compiler will give the window garbage value as output.

Ques 10:Which standard library will you use
to find the last occurrence of character in string using C?

Ans. –calloc() allocates a block of memory to an
array of certain size. By default it is initialized with 0. Whereas malloc()
allocates the bytes of memory block unlike calloc(), it takes a single
parameter which is the memory required in bytes.

Ques 16:In C if an array is passed through
argument, what actually gets passed?

Ans. – Base address of array

Ques 17:Tell the keyword which is used to
pass the control from the called function back to the calling block?

Ans. – return

Ques 18:In which header file is the NULL
macro defined?

Ans. – It is defined in stdio.h and stddef.h

Ques 19:How can we reduce a final size of
executable file?

Ans. – Size can be reduced by using dynamic linking
of libraries

Ques 20:What is FILE in C?

Ans. – FILE is a defined in stdio.h header file and
it is a predefined file type.

These C Programming
Interview Questions And Answers are offered by our team Privatejobshub.in, for
shaping up your mind sharp so that you must give your best in Interview.
So, Prepare well for your entire interview phase and all the very best! Please
write comments if you find anything incorrect, or you want to share more
information about the topic discussed above.