10 Mostly asked C interview questions in Accenture

This post on 10 mostly asked C interview questions in Accenture is a small part of Accenture interview questions for HR, written and technical.

C language is one of the most popular languages used in the software development industries. This is why the aspirants expect questions from the same language in the interviews. Below are the 10 suggestive questions based on C language asked in Accenture.

c interview questions

  1. What is the basic difference between C and C++?

C is a programming language that involves procedures and does not support objects and classes where as C++ is the combination of object oriented and procedure related programming language used worldwide by professional software developers. From this we can conclude that C++ is more of a hybrid language and C is a function driven language. C cannot hide information whereas C++ is capable to hide data structures to keep them unchanged for the sake of proper use.

  1. How an increment statement is constructed?

The conventional way to use the increment operator is using ++ sign. Using X++ means the value of X will be increased by 1. On the other hand using X = X + 1 also helps to increment the value to 1.

  1. What is the basic difference between Call by reference and Call by Value?

When Call by Value is used, a variable’s value is send as parameter to a function. When Call by Reference is used the address of the variable is directly send. The values are not affected in the former case but can be changed or affected in the later case.

  1. Why debuggers using comment symbols?

The comment symbols like /**/ means the isolated codes are commented out which might be causing errors in the entire programming. The code is not deleted as it can be correct. In this way the debugging is done and time is saved.

  1. What is stack?

Stack is a form of data structure to store data using the format FILO (First In Last Out) system. It means that the first input data will be drawn at the end and the data on the uppermost will be extracted at the beginning.

  1. What is the importance of Variable Initialization?

Variable Initialization is a step where a variable is assigned a proper initial value so that the when it is used in the program the computations does not give unpredictable results due to the unknown values.

  1. What is the difference between object codes and source codes?

The programmer writes the instruction using normal English keywords which after completion will instruct the computer to do a particular task. This is called source code. The source code is run through a compiler to change the format into which a computer understands the instructions. This is called object code.

  1. What is a Null Pointer?

NULL is used when it is needed to indicate a pointer not to point towards a valid location.

  1. What is a memory leak and why it should be avoided?

When programmers create and forget to delete a memory in heap it causes serious problems as it is never terminated.

  1. What is the use of local static variable?

A local static variable is a never ending variable. The variable does not end after a function call in which it is declared. The static variable extends along until the program is completed.

Leave a Reply

Your email address will not be published. Required fields are marked *