TCS Technical Interview Questions and Answers updated on Dec 2018
buy argumentative essay

TCS Technical Interview Questions and Answers updated on Dec 2018


style=”margin-top: 10px; margin-bottom: 10px; text-align: center; border: 1px solid #E5E5E5; background: #FDFDFD”>

C Multiple Choice Questions | MCQs | Quiz

C Programming Interview Questions and Answers
Practice C Programming questions and answers for interviews, campus placements, online tests, aptitude tests, quizzes and competitive exams.

Get Started

•   Variable Names – 1
•   Variable Names – 2
•   Data Types
•   Data Sizes
•   Constants – 1
•   Constants – 2
•   Declarations – 1
•   Declarations – 2
•   Arithmetic Operators – 1
•   Arithmetic Operators – 2
•   Relational Operators
•   Logical Operators
•   Type Conversions – 1
•   Type Conversions – 2
•   Increment Operators
•   Decrement Operators
•   Bitwise Operators – 1
•   Bitwise Operators – 2
•   Assigment Operators
•   Expressions
•   Conditional Expressions – 1
•   Conditional Expressions – 2
•   Operator Precedence – 1
•   Operator Precedence – 2
•   Order of Evaluation – 1
•   Order of Evaluation – 2
•   Associativity – 1
•   Associativity – 2
•   If Statements – 1
•   If Statements – 2
•   Switch Statements – 1
•   Switch Statements – 2
•   For Loops – 1
•   For Loops – 2
•   While Loops – 1
•   While Loops – 2
•   Break & Continue – 1
•   Break & Continue – 2
•   Goto & Labels – 1
•   Goto & Labels – 2
•   Functions Basics – 1
•   Function Basics – 2
•   Functions Return
•   Return Values
•   External Variables – 1
•   External Variables – 2
•   Variable Scope – 1
•   Variable Scope – 2
•   Static Variables – 1
•   Static Variables – 2
•   Register Variables – 1
•   Register Variables – 2
•   Automatic Variables – 1
•   Automatic Variables – 2
•   Preprocessor – 1
•   Preprocessor – 2
•   File Inclusion – 1
•   File Inclusion – 2
•   Macro Substitution – 1
•   Macro Substitution – 2
•   Conditional Inclusion – 1
•   Conditional Inclusion – 2
•   Pointers & Addresses – 1
•   Pointers & Addresses – 2
•   Function Arguments – 1
•   Pointers Arguments 2
•   Pointers & Arrays – 1
•   Pointers & Arrays – 2
•   Address Arithmetic – 1
•   Address Arithmetic – 2
•   Pointers/Functions – 1
•   Pointers/Functions – 2
•   Pointers to Pointers – 1
•   Pointers to Pointers – 2
•   Multidimensional Arrays – 1
•   Multidimensional Arrays – 2
•   Pointer Arrays Init – 1
•   Pointer Arrays Init – 2
•   Multi-dimensional Arrays – 1
•   Multi-dimensional Arrays – 2
•   Command Line Arguments1
•   Command Line Arguments2
•   Pointers to Functions – 1
•   Pointers to Functions – 2
•   Complicated Declarations-1
•   Complicated Declarations-2
•   Structures – 1
•   Structures – 2
•   Structures & Functions – 1
•   Structures & Functions – 2
•   Arrays of Structures – 1
•   Arrays of Structures – 2
•   Pointer to Structures – 1
•   Pointer to Structures – 2
•   Self-Referential Structures-1
•   Self-Referential Structures-2
•   Table Lookup – 1
•   Table Lookup – 2
•   Typedefs – 1
•   Typedefs – 2
•   Unions – 1
•   Unions – 2
•   Bit-fields – 1
•   Bit-fields – 2
•   Standard Input & Output – 1
•   Standard Input & Output – 2
•   Printf – 1
•   Printf – 2
•   Varargs – 1
•   Varargs – 2
•   Scanf – 1
•   Scanf – 2
•   File Access – 1
•   File Access – 2
•   Error Handling – 1
•   Error Handling – 2
•   Line Input & Output – 1
•   Line Input & Output – 2
•   String Operations – 1
•   String Operations – 2
•   Character Class – 1
•   Character Class – 2
•   Ungetc – 1
•   Ungetc – 2
•   Storage Management – 1
•   Storage Management – 2
•   Mathematical Functions – 1
•   Mathematical Functions – 2
•   Random Number – 1
•   Random Number – 2
•   Float Datatype – 1
•   Float Datatype – 2
•   Sizeof – 1
•   Sizeof – 2

C Tests

C Tests

Best Reference Books

C Programming Books
« Prev Page
Next Page »

C Programming Questions and Answers – Declarations – 2

Posted on


Sanfoundry’s 1000+ Interview Questions  Answers on C help anyone preparing for TCS and other companies C interviews. One should practice these 1000+ interview questions and answers continuously for 2-3 months to clear TCS interviews on C Programming language.

Here is a listing of C questions and puzzles on “Declarations” along with answers, explanations and/or solutions:

1. Which of the following declaration is illegal?
a) char *str = “Best C programming classes by Sanfoundry”;
b) char str[] = “Best C programming classes by Sanfoundry”;
c) char str[20] = “Best C programming classes by Sanfoundry”;
d) char[] str = “Best C programming classes by Sanfoundry”;
View Answer

Answer: d
Explanation: char[] str is a declaration in Java, but not in C.

2. Which keyword is used to prevent any changes in the variable within a C program?
a) immutable
b) mutable
c) const
d) volatile
View Answer

Answer: c
Explanation: const is a keyword constant in C program.

3. Which of the following is not a pointer declaration?
a) char a[10];
b) char a[] = ‘1’, ‘2’, ‘3’, ‘4’;
c) char *str;
d) char a;
View Answer

Answer: d
Explanation: Array declarations are pointer declarations.

4. What will be the output of the following C code?


  1.  #include <stdio.h>
  2.  void main()
  4.  int k = 4;
  5.  float k = 4;
  6.  printf("%d", k)

a) Compile time error
b) 4
c) 4.0000000
d) 4.4
View Answer

Answer: a
Explanation: Since the variable k is defined both as integer and as float, it results in an error.
$ cc pgm8.c
pgm8.c: In function ‘main’:
pgm8.c:5: error: conflicting types for ‘k’
pgm8.c:4: note: previous definition of ‘k’ was here
pgm8.c:6: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘double’
pgm8.c:7: error: expected ‘;’ before ‘}’ token

5. Which of the following statement is false?
a) A variable defined once can be defined again with different scope
b) A single variable cannot be defined with two different types in the same scope
c) A variable must be declared and defined at the same time
d) A variable refers to a location in memory
View Answer

Answer: c
Explanation: It is not an error if the variable is declared and not defined. For example – extern declarations.

6. A variable declared in a function can be used in main().
a) True
b) False
c) True if it is declared static
d) None of the mentioned
View Answer

Answer: b
Explanation: Since the scope of the variable declared within a function is restricted only within that function, so the above statement is false.

7. The name of the variable used in one function cannot be used in another function.
a) True
b) False
c) May be
d) None of the mentioned
View Answer

Answer: b
Explanation: Since the scope of the variable declared within a function is restricted only within that function, the same name can be used to declare another variable in another function.

Sanfoundry Global Education  Learning Series – C Programming Language.

C Practice Resources
C Mock Tests  Certification Test | 1000 C MCQs | 1000 C Programs | 1000 C Algorithms | Best C Books | C Internship
« Prev Page – C Programming Questions and Answers – Declarations – 1
» Next Page – C Programming Questions and Answers – Arithmetic Operators – 1
« C Programming Questions and Answers – Declarations – 1
C Programming Questions and Answers – Arithmetic Operators – 1 »


Manish Bhojasia , a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer and SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage & Cluster Administration, Advanced C Programming, SAN Storage Technologies, SCSI Internals and Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him below:
LinkedIn | Facebook | Twitter | Google+

Best Careers

Developer Tracks
SAN Developer
Linux Kernel Developer
Linux Driver Developer
Linux Network Developer

Live Training Photos
Software Productivity
GDB Assignment

Sanfoundry is No. 1 choice for Deep Hands-ON Trainings in SAN, Linux & C, Kernel Programming. Our Founder has trained employees of almost all Top Companies in India such as VMware, Citrix, Oracle, Motorola, Ericsson, Aricent, HP, Intuit, Microsoft, Cisco, SAP Labs, Siemens, Symantec, Redhat, Chelsio, Cavium, ST-Micro, Samsung, LG-Soft, Wipro, TCS, HCL, IBM, Accenture, HSBC, Mphasis, Tata-Elxsi, Tata VSNL, Mindtree, Cognizant and Startups.

Best Trainings

SAN I – Technology
SAN II – Admin
Linux Fundamentals
Advanced C Training
Linux-C Debugging
System Programming
Network Programming
Linux Threads
Kernel Programming
Kernel Debugging
Linux Device Drivers

Best Reference Books

Computer Science Books
Algorithm & Programming Books
Electronics Engineering Books
Electrical Engineering Books
Chemical Engineering Books
Civil Engineering Books
Mechanical Engineering Books
Industrial Engineering Books
Instrumentation Engg Books
Metallurgical Engineering Books
All Stream Best Books

Questions and Answers

1000 C Questions & Answers
1000 C++ Questions & Answers
1000 C# Questions & Answers
1000 Java Questions & Answers
1000 Linux Questions & Answers
1000 Python Questions
1000 PHP Questions & Answers
1000 Hadoop Questions
Cloud Computing Questions
Computer Science Questions
All Stream Questions & Answers

India Internships

Computer Science Internships
Instrumentation Internships
Electronics Internships
Electrical Internships
Mechanical Internships
Industrial Internships
Systems Internships
Chemical Internships
Civil Internships
IT Internships
All Stream Internships

About Sanfoundry

About Us
Privacy Policy
Bangalore Training
Online Training
Developers Track
Mentoring Sessions
Contact Us

Skip to content

    Prep Insta
    Prepare Better for Placement Papers

    TCS Placement Papers

    • Home
    • All Companies
    • Online Classes
    • Syllabus
    • Interview Experiences
    • Off Campus Drives

    TCS Previous Papers with Solutions for Recruitment

    Looking for TCS placement papers for your recruitment test? Don’t worry you will find all the tcs previous papers with solutions, tcs written test papers are of moderate difficulty. We have all the TCS Previous Questions from TCS Test Papers. These TCS Previous Question Papers are as observed constantly in each drive of TCS Placement Papers 2018 and all TCS Online Test Papers TCS Previous Year Question Paper, TCS Off Campus Drive Question Papers and On Campus Questions papers, TCS Sample Papers with Solutions PDF, TCS Model Papers with Solutions PDF for Exam, TCS 2018 Placement Papers, TCS Previous Year Papers, TCS Previous Year Question Papers with Solutions PDF, TCS Previous Year Placement Papers, TCS Multiple Choice Questions, TCS C MCQ Questions, TCS Question Paper TCS TNSLPP Anna University Pattern for Off campus 2018.

    TCS has changed its pattern and even questions bank in 2017 October, . We have the latest questions and the latest pattern updated in May.

    Note – If you have any question regarding the exam, comment at the end of the page we will answer within 10 mins.

    TCS consists of the following Sections according to the latest pattern changed this year –

    Get all the questions asked Today in TCS here – 

    TCS Ninja Live Questions Dashboard

    tcs placement papers with answers

    Table of Contents

    1. TCS Previous Papers Introduction
    2. Test Pattern
    3. TCS Questions
    4. Pattern Analysis
    5. TCS Success Story
    6. Step by Step Placement details
    7. TCS FAQ’s

    TCS Online Test Papers & TCS Placement Papers 2018

    Very Imp Note – There are some websites who are taking advantage of PrepInsta’s hardwork. They have made online live classes of their own by copying our materials, questions and codes.

    Infact our free materials has more study material than their Online Live classes or material that they give.

    We suggest not to trust anyone but PrepInsta and if you’ve bought the classes for them, attend them and make sure that you ask for refund as on day 1 of online live classes you will realise that our free material has more material than what you will get from them after paying 1000’s of Rs.

    TCS Previous Year Papers Pattern

    • TCS English Questions
    • TCS Questions on Quantitative Ability
    • TCS C MCQ Questions on Programming and Computer Science
    • TCS Questions on Coding Test

    If you like you can check detailed TCS Syllabus and Pattern here on this page .

    First we suggest you to check the eligibility criteria for TCS here on this page .

    Online Classes

    1. Free Paid Materials also given
    2. Click here to join Online Live Class

    TCS Paid Material –

    No Online Class in this, in Online class you will get preparation paid materials access also, but if you just want materials then you can buy the ones below –

    • TCS Aptitude Preparation Paid Materials
    • TCS Coding Preparation Paid Materials
    • TCS Verbal English Preparation Paid Materials
    • TCS Programming MCQ Preparation Paid Materials
    • TCS email Writing Preparation Paid Materials


    1. Click here to join Online Live Class

    Prices increase for Paid materials in


    TCS Free (There is a lot of free materials) –

    TCS Previous Test Papers and Answers

    TCS Test Papers -Quantitative Ability Part 1

    • Probability
    • Clocks and Calendar
    • Permutations and Combinations
    • Number System and HCF & LCM
    • Percentages
    • Allegations and Mixtures
    • Ratios, Proportion and Averages

    TCS Placement Papers – Quantitative Ability Part – 2

    • Work and Time
    • Series and Progressions
    • Time, speed, distance
    • Equations
    • Reasoning
    • Geometry
    • Arrangements and Series

    TCS Placement Papers – Quantitative Ability Part – 3

    • Divisibility
    • Averages
    • Profit & Loss
    • Problem on Ages
    • Area, Shapes & Perimeter
    • Numbers & Decimal Fractions

    Number of Questions – 20(18 + 2 Star Marked) TCS Questions

    Time – 40 mins

    Star Marked Questions have 2x more marks and have negative marking in tcs online test papers.

    TCS Quants Dashboard

    TCS Technical and Programming Logic Questions

    Our TCS Previous Year Question Papers with Solutions PDF our TCS Programming Logic Dashboard should help you a lot in practice.

    TCS Previous Papers and solutions with Syllabus

    TCS Technical and Programming Logic Dashboard

    TCS Verbal English

    This topic has just been introduced in TCS and there are 10 questions and the time given is also 10 mins.

    TCS Placement Questions and papers

    TCS Verbal English Questions

    TCS Questions on Email Writing Section Test Paper

    • Go to TCS E-Mail Writing Dashboard.

    Time – 10 Mins

    This section is there in TCS Previous Year Question Papers with Solutions PDF.

    TCS Test Papers from previous year papers

    TCS Email Writing Dashboard

    TCS Questions on Coding Test Paper

    In this section you have to solve a Coding Question in Language of your choice. Number of questions are 1 in 20 mins which is simple and have to code in in-built online compiler in TCS Online Test Papers.

    • Go to TCS Coding Section Dashboard.
    Tata Consultancy Services Campus Placement Papers Pattern and Syllabus TCS Previous Year Papers

    TCS Coding Dashboard

    TCS Online Test Paper –  Interview Preparation Dashoard

    Find all the Technical Interview Quetions, Managerial and HR round pattern and most asked questions on this dashboard here.

    • Go to TCS Interview Preparation Dashboard.
    TCS Written Test Paper and TCS Online Test Questions with Answers

    TCS Interview Preparation Dashboard

    TCS Placement Papers Syllabus and Paper Pattern Analysis

    Negative Marking in Recruitment Test

    • There is negative marking of 0.33 per wrong question in TCS Multiple Choice Questions.
    • Negative marking is only applicable in the Quants section, English and Programming Logic, there is no negative marking for the Creative Coding section.
    TCS Placement Papers SectionsNumber of QuestionsAllotted Time No. of Star Marked QuestionsNegative Marking
    TCS Questions on Quantitative Aptitude20 Questions40 Minutes5Yes
    Verbal English10 Questions10 Minutes0Yes
    Programming Logic efficiency MCQ10 Questions20 Minutes3Yes
    Coding Round1 Question20 Minutes0No

    TCS Previous Papers with Solutions based Facts in Hiring Trends

    TCS will hire lesser number of Engineers this year, as there is slow down in hiring trends of all IT companies thus these TCS Previous papers PDF should help you a lot.

    TCS Previous Papers based Hiring2011 – 122012 – 132013 -142014- 152015 -162016 – 20172017 – 182018 – 2019
    No of Emplyees Hired by TCS70,00069,27861,20067,00070,00081,00060,00045,000
    Net AdditionN.A59,00046,00035,00045,00030,00012,0009,000
    Total Employees1,70,0002,29,0002,75,0003,10,0003,55,0003,75,0003,87,0003,96,000

    TCS Previous Papers excelled – Success Story in TCS Question Paper

    If you want to read more such On campus and Off Campus Interview Experiences you can read them on our TCS Interview Experiences Dashboard here .

    • Name – Akshit
    • College – MIET, Meerut
    • Branch – CSE

    TCS Previous Year Placement Papers Story

    Coming from a Tier 3 college, I wasn’t expecting a lot of CS companies to visit our Campus. So TCS was one of the Big Companies I was hoping to get selected into. All my seniors had suggested to prepare from PrepInsta for any company including TCS. I had purchased the paid material also, for TCS Previous Year Question Papers with Solutions PDF will recommend others as well to buy since a small amount may land you up in a job in TCS by studying TCS Previous Papers with Solutions and Questions so you clear the first round with ease in TCS Previous Year Questions.

    TCS Placement Papers 2018 was of very high difficulty as TCS is looking to hire lesser number of Freshers this year due to slow down in the Software Services Industry.

    Akshit Ram

    Selected in TCS , KIET Meerut

    Here is Step by Step details for TCS 2018 Placement Papers By Akshit Ram – 

    Round 1: Online Round

    For TCS Previous Year Papers these are the following sections in TCS 2018 Placement Papers –

    Do note that you need to do all the rounds well as all of them have sectional cut offs in TCS Previous Year Placement Papers. Even if you cant score well in one round you wont be selected even though you had done the other rounds well.

    Verbal english

    This is round is of 10 minutes and 10 questions were there most of them were Fill the Blanks and Sentence Completion Questions.

    TCS Questions on Quantitative Ability & Reasoning

    This section has quantitative questions. Please refer previous year TCS papers and prepare. Prepare for TCS specific quant topic, thanks for letting me know PrepInsta.

    TCS C MCQ Questions on Technical MCQ Section

    This round is of 20 minutes. It is based on C language and please prepare all the basic concepts of C to clear this section.

    Coding Test

    From This year we didn’t have code in Command Line Programming and we could code in any of the following languages – C, C++, Java, Python etc.

    TCS Multiple Choice Questions Tech Round

    Round 2: Technical Round

    After TCS Written Round we had this face to face round where you will be tested what you have done in years of your engineering. I  had revised my engineering subjects basics. The person interviewing you may ask you your strong subject so please tell the subject that you have prepare well (I told C and Java).

    I was asked to write a simple program to find all the prime numbers less than a number. I wrote a separate function for prime numbers and used a for loop to check all the numbers less than N, to check if they are prime or not. If they were prime i displayed the number. Then he gave coin weight balance puzzle which i stumbled with but after some clues i understood the problem, but i couldn’t give an accurate solution.The next series of questions was from C, which i managed to answer. Some of my friends got questions from OS and DBMS too in TCS Previous Year Placement Papers. It depends on your luck, so do prepare subjects like Networks, DBMS, OS, JAVA, C, C++  for tcs off campus placement paper.

    For Non CS/IT people questions were on projects resume and branch based questions like circuit diagram of project and basic questions, definitions.

    TCS Question Paper Round 3: Managerial Round

    I was asked about my projects here. I was asked about my interests. My views and ideas of technology was tested. My friends had a few questions from programming here. This round basically checks your attitude and behaviour. Please try to be the person whom you are, if you pretend here ,the recruiters are smart enough to know that. If you don’t know something, then tell you are not sure about it. Also ask any query regarding the company when you are given a chance ,failing to do so will show your lack of interest for the company in TCS 2018 Placement Papers.

    Round 4: HR Round

    After TCS Question Paper Round this round will be a round where your knowledge for TCS will be tested. Do prepare your introduction and also about TCS very well. If you had participated in  CodeVita or testimony ,please mention that in your introduction. You should be able to convince the HR about why you want to join TCS. Again, try to be yourself here. If had done the other rounds well, then you are mostly in. Ask 1 or queries about the company or your role when you are given the chance.Before leaving, greet the person who was interviewing you and leave.

    Proper aptitude and 2 week’s preparation is enough to get the job via TCS Previous Year Placement Papers, provided you are determined. I felt the first round to be toughest Solve as much as TCS Previous Year Papers that will be very crucial So, prepare well, all the best! for both tcs off campus placement paper and On Campus Paper.

    Check this video for the latest TCS Pattern for the year 2018.

    TCS Placement Papers 2018 based FAQ’s

    What all questions can come in tcs exams??

    Prepinsta has provided the most favourable topics that can come in TCS Exams with no of questions to practice every topic and achieve a good score in every exam.

    What is the level of difficulty for TCS Previous Question Papers?

    Generally in TCS Question Paper from what we have seen that the questions asked in TCS Previous Question Papers are tough and are of high difficulty. We suggest you to do preparation for TCS Exam from PrepInsta’s TCS Placement Papers 2018.

    which is the most important section in tcs previous year question paper?

    For tcs previous year question paper we will suggest preparing well for the coding section a new Coding section was there in which you could use any language of your choice and last year’s command line programming section has was removed. This year coding will be an important section as TCS looks to higher lesser number of Fresher Graduates via tcs online test papers for Recruitment.

    What are some most asked TCS Questions?

    For TCS Previous Year Questions here you can find in descending order the list of most asked TCS Questions Click here .

    Have a Question?

    Ask in the comments section below, we will answer :).


    Copyright © 2018 Prep Insta — Escapade WordPress theme by GoDaddy


    Login with email


    Already Registered?
    Login with email

    Register with your
    social profile


    Already Registered?
    Login Here

    Register with email

    Forgot Password?


    Login with your social profiles

    Home » Interview Questions » Technical Interview Questions » Tcs Technical Interview Questions And Answers

    csharp Interview Questions

    C Programming Interview Questions

    Java Interview Questions

    Civil Interview Questions

    C++ Interview Questions

    PHP Interview Questions

    DBMS Interview Questions

    OS Interview Questions

    Software Testing Interview Questions

    Networking Interview Questions

    Data Structure Interview Questions

    .Net Interview Questions

    Algorithms Interview Questions

    Software Testing

    Electrical Interview Questions

    Electronics Interview Questions


    Mechanical Interview Questions



    TCS Technical Interview Questions and Answers


    TCS Technical Interview Questions and Answers updated on Dec 2018


    TCS Possible Technical Interview Questions| for new Campus Recruitment

    Interview With TCS

     The Campus Interview

    This interview usually takes 45 minutes to an hour and may have one or two interviewers. One interviewer may focus on your communication skills, self-management skills and background by asking behavioral questions. The other will focus on your technical capabilities.

    The Phone Interview

    If TCS not coming to your school this fall, and you have probably submitted your resume online. You look great on paper and they would like to have an employment discussion with candidate. They will set up a mutually-convenient date and time for your phone interview. Your interviewer will assess your communication skills, self-management skills and background by asking behavioral questions. He / she may also assess your technical ability. If the phone interview goes well, you will be asked to join us for an in-person interview.


    TCS Technical interview Questions

    1. What is your strongest programming language (Java, ASP, C, C++, VB, HTML, C#, etc.)? 

       Point to remember: Before interview You should decide your Favorite programming language and be prepared based on that question.


    2.Differences between C and Java?

    1.JAVA is Object-Oriented while C is procedural.

    2.Java is an Interpreted language while C is a compiled language.

    3.C is a low-level language while JAVA is a high-level language.

    4.C uses the top-down approach while JAVA uses the bottom-up approach.

    5.Pointer go backstage in JAVA while C requires explicit handling of pointers.

    6.The Behind-the-scenes Memory Management with JAVA & The User-Based Memory Management in C.

    7.JAVA supports Method Overloading while C does not support overloading at all.

    8.Unlike C, JAVA does not support Preprocessors, & does not really them.

    9.The standard Input & Output Functions–C uses the printf & scanf functions as its standard input & output while JAVA uses the System.out.print & functions.

    10.Exception Handling in JAVA And the errors & crashes in C.


    3.In header files whether functions are declared or defined?

    Functions are declared within header file. That is function prototypes exist in a header file,not function bodies. They are defined in library (lib).


    4.What are the different storage classes in C ?

    There are four types of storage classes in C. They are extern, register, auto and static


    5.What does static variable mean?

    Static is an access qualifier. If a variable is declared as static inside a function, the scope is limited to the function,but it will exists for the life time of the program. Values will be persisted between successive 
    calls to a function


    6.How do you print an address ?

    Use %p in printf to print the address.


    7.What are macros? what are its advantages and disadvantages? 

    Macros are processor directive which will be replaced at compile time.
    The disadvantage with macros is that they just replace the code they are not function calls. similarly the advantage is they can reduce time for replacing the same values.


    8.Difference between pass by reference and pass by value? 
    Pass by value just passes the value from caller to calling function so the called function cannot modify the values in caller function. But Pass by reference will pass the address to the caller function instead of value if called function requires to modify any value it can directly modify.

    9.What is an object?

    Object is a software bundle of variables and related methods. Objects have state and behavior


    10.What is a class?

    Class is a user-defined data type in C++. It can be created to solve a particular kind of problem. After creation the user need not know the specifics of the working of a class.


    11.What is the difference between class and structure?

    Structure: Initially (in C) a structure was used to bundle different type of data types together to perform a particular functionality. But C++ extended the structure to contain functions also. 
    The major difference is that all declarations inside a structure are by default public.
    Class: Class is a successor of Structure. By default all the members inside the class are private.


    12. What is ponter?

    Pointer is a variable in a program is something with a name, the value of which can vary. The way the compiler and linker handles this is that it assigns 
    a specific block of memory within the computer to hold the value of that variable.


    13.What is the difference between null and void pointer?

    A Null pointer has the value 0. void pointer is a generic pointer introduced by ANSI. Generic pointer can hold the address of any data type. 


    14.what is function overloading 

       Function overloading is a feature of C++ that allows us to create multiple functions with the same name, so long as they have different parameters.Consider the following function:
       int Add(int nX, int nY)
          return nX + nY;


    15.What is function overloading and operator overloading?

    Function overloading: C++ enables several functions of the same name to be defined, as long as these functions have different sets of parameters (at least as far as their types are concerned). This capability is called function overloading. When an overloaded function is called, the C++ compiler selects the proper function by examining the number, types and order of the arguments in the call. Function overloading is commonly used to create several functions of the same name that perform similar tasks but on different data types.
    Operator overloading allows existing C++ operators to be redefined so that they work on objects of user-defined classes. Overloaded operators are syntactic sugar for equivalent function calls. They form a pleasant facade that doesn’t add anything fundamental to the language (but they can improve understandability and reduce maintenance costs).


    16.what is friend function?

    A friend function for a class is used in object-oriented programming to allow access to public, private, or protected data in the class from the outside.
    Normally, a function that is not a member of a class cannot access such information; neither can an external class. Occasionally, such access will be advantageous for the programmer. Under these circumstances, the function or external class can be declared as a friend of the class using the friend keyword.


    17.What do you mean by inline function?
    The idea behind inline functions is to insert the code of a called function at the point where the function is called. If done carefully, this can improve the application’s performance in exchange for increased compile time and possibly (but not always) an increase in the size of the generated binary executables.

    18. Tell me something about abstract classes?

    An abstract class is a class which does not fully represent an object. Instead, it represents a broad range of different classes of objects. However, this representation extends only to the features that those classes of objects have in common. Thus, an abstract class provides only a partial description of its objects.

    19.What is the difference between realloc() and free()?

    The free subroutine frees a block of memory previously allocated by the malloc subroutine. Undefined results occur if the Pointer parameter is not a valid pointer. If the Pointer parameter is a null value, no action will occur. The realloc subroutine changes the size of the block of memory pointed to by the Pointer parameter to the number of bytes specified by the Size parameter and returns a new pointer to the block. The pointer specified by the Pointer parameter must have been created with the malloc, calloc, or realloc subroutines and not been deallocated with the free or realloc subroutines. Undefined results occur if the Pointer parameter is not a valid pointer.


    20.What is the difference between an array and a list?

    Array is collection of homogeneous elements. List is collection of heterogeneous elements.
    For Array memory allocated is static and continuous. For List memory allocated is dynamic and Random.
    Array: User need not have to keep in track of next memory allocation.
    List: User has to keep in Track of next location where memory is allocated.
    Array uses direct access of stored members, list uses sequential access for members.


    21.What are the differences between structures and arrays?

    Arrays is a group of similar data types but Structures can be group of different data types

    22.What is data structure?
    A data structure is a way of organizing data that considers not only the items stored, but also their relationship to each other. Advance knowledge about the relationship between data items allows designing of efficient algorithms for the manipulation of data.

    23. Can you list out the areas in which data structures are applied extensively?

    Compiler Design,

    Operating System,

    Database Management System,

    Statistical analysis package,

    Numerical Analysis,


    Artificial Intelligence,


    24.What are the advantages of inheritance?

    It permits code reusability. Reusability saves time in program development. It encourages the reuse of proven and debugged high-quality software, thus reducing problem after a system becomes functional.

    25. what are the two integrity rules used in DBMS?

    The two types of  integrity rules are referential integrity rules and entity integrity rules. Referential integrity rules dictate that a database does not contain orphan foreign key values. This means that 
    A primary key value cannot be modified if the value is used as a foreign key in a child table. Entity integrity dictates that the primary key value cannot be Null.

    26. Tell something about deadlock and how can we prevent dead lock?

    In an operating system, a deadlock is a situation which occurs when a process enters a waiting state because a resource requested by it is being held by another waiting process, which in turn is waiting for another resource. If a process is unable to change its state indefinitely because the resources requested by it are being used by other waiting process, then the system is said to be in a deadlock.

    Mutual Exclusion: At least one resource must be non-shareable.[1] Only one process can use the resource at any given instant of time.
    Hold and Wait or Resource Holding: A process is currently holding at least one resource and requesting additional resources which are being held by other processes.
    No Preemption: The operating system must not de-allocate resources once they have been allocated; they must be released by the holding process voluntarily.
    Circular Wait: A process must be waiting for a resource which is being held by another process, which in turn is waiting for the first process to release the resource. In general, there is a set of waiting processes, P = P1, P2, …, PN, such that P1 is waiting for a resource held by P2, P2 is waiting for a resource held by P3 and so on till PN is waiting for a resource held by P1.[1][7]

    Thus prevention of deadlock is possible by ensuring that at least one of the four conditions cannot hold.

    27. What is Insertion sort, selection sort, bubble sort( basic differences among the functionality of the three sorts and not the exact algorithms)


    28. What is Doubly link list?

     A doubly linked list is a linked data structure that consists of a set of sequentially linked records called nodes. Each node contains two fields, called links, that are references to the previous and to the next node in the sequence of nodes. The beginning and ending nodes’ previous and next links, respectively, point to some kind of terminator, typically a sentinel node or null, to facilitate traversal of the list. If there is only one sentinel node, then the list is circularly linked via the sentinel node. It can be conceptualized as two singly linked lists formed from the same data items, but in opposite sequential orders.

    29.What is data abstraction?  what are the three levels of data abstraction with Example?

    Abstraction is the process of recognizing and focusing on important characteristics of a situation or object and leaving/filtering out the un-wanted characteristics of that situation or object.

    Lets take a person as example and see how that person is abstracted in various situations

    A doctor sees (abstracts) the person as patient. The doctor is interested in name, height, weight, age, blood group, previous or existing diseases etc of a person
    An employer sees (abstracts) a person as Employee. The employer is interested in name, age, health, degree of study, work experience etc of a person. 

    Abstraction is the basis for software development. Its through abstraction we define the essential aspects of a system. The process of identifying the abstractions for a given system is called as Modeling (or object modeling).

    Three levels of data abstraction are:
    1. Physical level : how the data is stored physically and where it is stored in database.
    2. Logical level : what information or data is stored in the database. eg: Database administrator
    3.View level : end users work on view level. if any amendment is made it can be saved by other name.


    30.What is command line argument?

    Getting the arguments from command prompt in c is known as command line arguments. In c main function has three arguments.They are:

    Argument counter
    Argument vector
    Environment vector

    31.Advantages of a macro over a function?

    Macro gets to see the Compilation environment, so it can expand #defines. It is expanded by the preprocessor. 

    32.What are the different storage classes in C? 


    33.Which header file should you include if you are to develop a function which can accept variable number of arguments?


    34.What is cache memory ?

    Cache Memory is used by the central processing unit of a computer to reduce the average time to access memory. The cache is a smaller, faster memory 

    which stores copies of the data from the most frequently used main memory locations. As long as most memory accesses are cached memory locations, the average
    latency of memory accesses will be closer to the cache latency than to the latency of main memory.

    35.What is debugger?
    A debugger or debugging tool is a computer program that is used to test and debug other programs

    36. Const char *p , char const *p What is the difference between the above two?   

    1) const char *p – Pointer to a Constant char (‘p’ isn’t modifiable but the pointer is)
    2) char const *p – Also pointer to a constant Char 

    However if you had something like:
    char * const p – This declares ‘p’ to be a constant pointer to an char. (Char p is modifiable but the pointer isn’t)


    37. What is Memory Alignment?  

    Data structure alignment is the way data is arranged and accessed in computer memory. It consists of two separate but related issues: data alignment and data structure padding. 


    38.Explain the difference between ‘operator new’ and the ‘new’ operator?   

    The difference between the two is that operator new just allocates raw memory, nothing else. The new operator starts by using operator new to allocate memory, but then it invokes the constructor for the right type of object, so the result is a real live object created in that memory. If that object contains any other objects (either embedded or as base classes) those constructors as invoked as well.

    39. Difference between delete and delete[]?    

    The keyword delete is used to destroy the single variable memory created dynamically which is pointed by single pointer variable.

    Eg: int *r=new(int)
    the memory pointed by r can be deleted by delete r.
    delete [] is used to destroy array of memory pointed by single pointer variable.
    Eg:int *r=new(int a[10])
    The memory pointed by r can be deleted by delete []r.

    40. What is conversion constructor?    

    A conversion constructor is a single-parameter constructor that is declared without the function specifier ‘explicit’. The compiler uses conversion constructors to convert objects from the type of the first parameter to the type of the conversion constructor’s class.To define implicit conversions, C++ uses conversion constructors, constructors that accept a single parameter and initialize an object to be a copy of that parameter.

    41.What is a spanning Tree?

    A spanning tree is a tree associated with a network. All the nodes of the graph appear on the tree once. A minimum spanning tree is a spanning tree organized so that the total edge weight between nodes is minimized.  

    42. Why should we use data ware housing and how can you extract data for analysis with example?

    If you want to get information on all the techniques of designing, maintaining, building and retrieving data, Data warehousing is the ideal method. A data warehouse is premeditated and generated for supporting the decision making process within an organization.

    Here are some of the benefits of a data warehouse:

    o With data warehousing, you can provide a common data model for different interest areas regardless of data’s source. In this way, it becomes easier to report and analyze information.

    o Many inconsistencies are identified and resolved before loading of information in data warehousing. This makes the reporting and analyzing process simpler.

    o The best part of data warehousing is that the information is under the control of users, so that in case the system gets purged over time, information can be easily and safely stored for longer time period.

    o Because of being different from operational systems, a data warehouse helps in retrieving data without slowing down the operational system.

    o Data warehousing enhances the value of operational business applications and customer relationship management systems.

    o Data warehousing also leads to proper functioning of support system applications like trend reports, exception reports and the actual performance analyzing reports.

    Data mining is a powerful new technology to extract data for analysis.


    43.Explain recursive function & what is the data structures used to perform recursion?

    a) A recursive function is a function which calls itself.

    b) The speed of a recursive program is slower because of stack overheads. (This attribute is evident if you run above C program.)
    c) A recursive function must have recursive conditions, terminating conditions, and recursive expressions.

    Stack data structure . Because of its LIFO (Last In First Out) property it remembers its caller so knows whom to return when the function has to return. Recursion makes use of system stack for storing the return addresses of the function calls. Every recursive function has its equivalent iterative (non-recursive) function. Even when such equivalent iterative procedures are written, explicit stack is to be used.

    44.Differentiate between Complier and Interpreter?
    An interpreter reads one instruction at a time and carries out the actions implied by that instruction. It does not perform any translation. But a compiler translates the entire instructions


    45.What is scope of a variable?
    Scope refers to the visibility of variables. It is very useful to be able to limit a variable’s scope to a single function. In other words, the variable wil have a limited scope

    46.What is an interrupt?
       Interrupt is an asynchronous signal informing a program that an event has occurred. When a program receives an interrupt signal, it takes a specified action. 


    47.What is user defined exception in Java?

    The keywords used in java application are try, catch and finally are used in implementing used-defined exceptions. This Exception class inherits all the method from Throwable class.


    48.What is java Applet?

    Applet is java program that can be embedded into HTML pages. Java applets runs on the java enables web browsers such as mozila and internet explorer. Applet is designed to run remotely on the client browser, so there are some restrictions on it. Applet can’t access system resources on the local computer. Applets are used to make the web site more dynamic and entertaining. 


    49.What do you know about the garbage collector?

    Garbage collection is the systematic recovery of pooled computer storage that is being used by a program when that program no longer needs the storage. This frees the storage for use by other programs 
    (or processes within a program). It also ensures that a program using increasing amounts of pooled storage does not reach its quota (in which case it may no longer be able to function). 

    Garbage collection is an automatic memory management feature in many modern programming languages, such as Java and languages in the .NET framework. Languages that use garbage collection are often interpreted or run within a virtual machine like the JVM. In each case, the environment that runs the code is also responsible for garbage collection.


    50.Write a Binary Search program

    int binarySearch(int arr[],int size, int item)

    int left, right, middle;
    left = 0;
    right = size-1;

    while(left <= right) middle = ((left + right)/2); if(item == arr[middle]) return(middle);
    if(item > arr[middle])

    left = middle+1;


    right = middle-1;



    51.What are enumerations?

    An enumeration is a data type, used to declare variable that store list of names. It is act like a database, which will store list of items in the variable. example: enum shapes{triangle, rectangle,…


    52.What is static identifier?

    The static identifier is used for initializing only once, and the value retains during the life time of the program / application. A separate memory is allocated for ‘static’ variables. This value can be used between function calls. The default value of an uninitialized static variable is zero. A function can also be defined as a static function, which has the same scope of the static variable. 


    53.What is Cryptography?
    Cryptography is the science of enabling secure communications between a sender and one or more recipients. This is achieved by the sender scrambling a message (with a computer program and a secret key) and leaving the recipient to unscramble the message (with the same computer program and a key, which may or may not be the same as the sender’s key).
    There are two types of cryptography: Secret/Symmetric Key Cryptography and Public Key Cryptography


    54.What is encryption?

    Encryption is the transformation of information from readable form into some unreadable form.

    55.What is decryption?

    Decryption is the reverse of encryption; it’s the transformation of encrypted data back into some intelligible form.

    56.What exactly is a digital signature?

    Just as a handwritten signature is affixed to a printed letter for verification that the letter originated from its purported sender, digital signature performs the same task for an electronic message. A digital signature is an encrypted version of a message digest, attached together with a message.

    Similar Categories

    TCS Technical Interview Questions and Answers

    Infosys Technical Interview Questions and Answers

    IBS Technical Interview Questions and Answers

    WIPRO Technical Interview Questions and Answers

    UST Global Technical Interview Questions and Answers

    Online Quantitative test
    Online Verbal Ability Test
    Online Reasoning Test
    Online Data Interpretation Test
    Online Assesment Test
    Technical Online Tests
    IT companies Online Test
    Non IT companies And Bank Online Test
    Basic General Knowledge
    Basic General Knowledge Level-2
    Online Current Affairs Test
    Online GATE Test
    Online CAT Test

    feedback : The No.1 Jobsite for Fresher Hiring in India is the No.1 Jobsite for Freshers in India with over 1 Crore+ resumes and 60K+ recruiters hiring through us. Apply to Top MNC Jobs / Government jobs by registering now! What’s more? Get daily job alert, placement paper and GK updates every day on your email. is the only website for applying to Govt Jobs and top MNC Jobs all over India. Register Now to benefit from our unlimited fresher focussed services!

    Get in Touch with us

    • Post Job for Free
    • |
    • End-to-End Recruitment
    • |
    • Campus Recruitment
    • |
    • Online Assessment
    • |
    • Resume Search

    • About Us
    • |
    • Blog
    • |
    • FAQs
    • |
    • Advertise With Us
    • |
    • Recruitment Solutions
    • |
    • Contact Us

    © 2006-2018

    • Terms of Use
    • |
    • Privacy Policy
    • |
    • Copyright
    • |
    • Site Map
      © 2006-2018

    Jobs By Category
    Other Categories
    Jobs By Courses
    Jobs By Cities

    • IT / Software Jobs
    • Core Technical Jobs
    • Government Jobs
    • Defence Jobs
    • Research Jobs
    • BPO Jobs
    • Bank Jobs
    • 5 lpa Jobs”>Dream Jobs > 5 lpa
    • Read More…
    • Job Results
    • Jobs By Company
    • Jobs by Branches
    • Jobs by Roles
    • Jobs by Skills
    • Internship Jobs
    • Scholarships Jobs
    • Success Stories
    • BE Jobs / B.Tech Jobs
    • MCA Jobs
    • MBA Jobs / PGDM Jobs
    • ME Jobs / M.Tech Jobs
    • M.Sc Jobs
    • B.Com Jobs
    • BBA / BBM Jobs
    • BCA Jobs
    • Read More…
    • Jobs in Ahmedabad
    • Jobs in Bangalore
    • Jobs in Chennai
    • Jobs in Delhi / NCR
    • Jobs in Hyderabad
    • Jobs in Kolkata
    • Jobs in Mumbai
    • Jobs in Pune
    Interview Questions

    Interview Questions
    Technical Interview Questions
    Group Discussion
    Resume Format

    • HR interview Questions
    • How to face interview
    • Interview Preparation
    • Bank Interview Questions
    • Etiquettes
    • Read More…
    • C Interview Questions
    • Java Interview Questions
    • .Net Interview Questions
    • Networking Interview Questions
    • Read More…
    • Current GD Topics
    • GD Tips
    • Types of GD
    • MBA GD Topics
    • GD Dos and Donts
    • Read More…
    • Resume Samples
    • How to write a resume
    • Sample Cover Letter
    • Resume Tips
    • Resume Mistakes
    • Read More…
    Exam Preparation

    Entrance Exam Preparation
    Bank Exam Preparation
    PSC Question Papers
    PSU Companies

    • CAT Papers
    • MAT Papers
    • JEE Papers
    • GATE CSE Papers
    • GATE ECE Papers
    • Read More…
    • Axis Bank Question Papers
    • IBPS Question Papers
    • HDFC Question Papers
    • SBI Question Papers
    • ICICI Question Papers
    • Read More…
    • Kerala PSC Question Papers
    • UPPSC Question Papers
    • RPSC Question Papers
    • MPSC Question Papers
    • MPPSC Question Papers
    • Read More…
    • SSC Question Papers
    • UPSC Question Papers
    • Indian Railways Question Papers
    • Air India Question Papers
    • LIC Question Papers
    • Read More…

    Aptitude Questions
      Quantitative Aptitude

      Logical Reasoning

      Data Interpretation
      Verbal Ability

    Current Affairs
    • Current Affairs Latest
    • March 2016
    • February 2016
    • Read More…

    General Knowledge
    • Indian Economy
    • Indian History
    • Indian Constitution
    • General Science
    • Indian Geography
    • World History
    • Inventions
    • World Geography
    • Read More…


    Tags: , , , ,