Sunday, September 15, 2013

Basic C interview questions for Mass companies like Accenture, TCS, Infosys & Wipro

In this post freshers seeking job in IT sector can find some basic definitions related to c language. Such definitions are usually asked by companies such as TCS, CTS, Infosys, Accenture and Wipro during mass recruitment.

C Interview questions answers

Collection of Simple C Interview Questions: 

#1 Variable: named memory location used to store value of particular data type.
#2 Data type: Means to identify the type of data. Eg. int, float, char
#3 Pointers: A special type of variable that stores address of another variable.
#4 Compound Statement: Group of statements enclosed in {}
#5 Identifier: Names given by programmer to various parts of program. Eg. In int a=5; ‘a’ is an identifier.
#6 Token: Smallest individual unit of a program. Eg. variable, constants.
#7 function: Group of statements used to perform a particular task. It may or may not accept parameters and may or may not return a value. They help in code re-usability.
#8 Keyword: Words which convey special meaning to compiler. Eg. for, int, while etc.
#9 Recursion: When a function calls itself.
#10 Array: Collection of similar data type stored in contiguous memory location.
#11 structure: Collection of data of any data type stored in contiguous memory space.
#12 String: Array of character.

Other simple C language questions asked in mass companies:

#13 Difference between = and == operator
#14 Differences between C and C++
#15 Difference between for(), while and do while loops.
#16 Types of storage class in C (auto, register, extern and static)
#17 Program to reverse a number
#18 C program to swap numbers with and without temporary variable.
#19 Difference between structure and union.
#20 What is typedef.
#21 What is void pointer.
#22 What is null pointer.
#23 Differences between actual parameter and formal parameter.
#24 What is a function definition?
#25 What is a function signature?
#26 Differentiate between call by address and call by value.
#27 Differentiate between switch and if statement.
#28 Difference between malloc() and calloc()
#29 C Program to print factorial of a number.
#30 C Program to find sum of matrix
#31 C sorting programs: bubble, insertion and selection
#32 C code for linear and binary search

#33 What are type casting and type promotion?

No comments:

Post a Comment

Google+ Followers