SlideShare a Scribd company logo
1 of 10
Download to read offline
 
 
 
Visionard  
Humans + Technology = Great Combination 
Top interview questions in C 
Duration​ 1 Hour 
Difficulty Level​ Beginner 
   
 
Visionard, your learning partner 
 
1 
 
 
 
Question 1 
What are the features of C language? 
Answer 
C language has many inbuilt features such as 
● It combines features of assembly language and high level language. 
● Easy to program​ - C languages has data types and different operators, which makes 
easier to write complex program 
● Portable​ - Program written on C are portable, hence can be used in other computer with 
no modification 
● Easy to extends​ - You can easily create your own functions and libraries in C language. 
● Very fast​ - Program written in c are very fast to run with no delay 
● Rich set of libraries ​- C languages has rich set of libraries, which makes coding complex 
program easier. 
Question 2 
What is the difference between source code and object code? 
Answer 
Source code​ is the code which is written by the programmer, it consists of all the functions, 
conditional statements and libraries. Only a human being can read this code while computer 
cannot read this code.  
Source code ​extension ​in c language is ​.c 
Object code​ when you compile the source code, you get the object code. The format of the code 
is only computer readable.  
Object code ​extension ​in language is ​.obj 
 
 
Visionard, your learning partner 
 
2 
 
 
 
 
Question 3 
What is the difference between ​= ​and ​== ​? 
Answer 
= ​is also known as ​assignment operator​ which is used to assign a value to the variable 
== ​is also known as ​comparison operator ​which is used to compare two values in a conditional 
statement. 
Question 4 
What is a header file and why we need header file in C program? 
Answer  
A ​header file​ are also known as ​library​. They contain ​definition ​and ​prototype ​of the ​inbuilt 
functions. ​Header files have ​.h ​as their file extension. 
We need header files so, we can use functions which are inbuilt within the language. 
Example 
studio.h ​contains functions like ​printf() 
Question 5 
What is the difference between ​syntax error, run-time error ​and ​logical error? 
Answer 
Syntax error ​occurs when we make mistakes in the syntax of c program. This error is shown 
when we try to compile our program, so it is also known as ​compile time error.  
Example 
● A missing semicolon 
 
Visionard, your learning partner 
 
3 
 
 
 
Run-time error ​occurs during the execution of our program after successful compilation. A 
compiler cannot find them so they are very hard to find, as they only occur during the run time of 
the program. 
Example 
● Dividing a number with 0 
Logical Error ​occurs when you get different output based on the input. Major cause of this error 
is logic created by the programmer. They are again hard to find and cannot be detected by the 
compiler. 
Example 
● A sum of 2 number returning a negative value. 
Question 6 
Why C language is known as middle level language? 
OR 
What type of language is C language? Low level, middle level or high level? 
Answer 
C language is known as ​middle level language ​because it can access ​machine level(low level) 
features like accessing structure of the memory just like assembly language. 
But also acts as high level language in which you can use english language to write your 
program. 
 
 
 
 
 
Visionard, your learning partner 
 
4 
 
 
 
Question 7 
What is the difference between i++ and ++i? 
OR 
What is the difference between​ post increment operator​ and ​pre increment operator​? 
Answer 
Post increment operator or i++ 
In this, we first assign the value and then increment the value by one 
Pre increment operator or ++i 
In this, we first increment the value by one and then assign the value. 
Question 8 
What is the difference between ​actual parameters​ and ​formal parameters​? 
Answer 
Actual Parameters ​are passed when you call the function in your program. 
Formal Parameters​ are parameters which are given in the prototype and definition of the 
function. 
 
Visionard, your learning partner 
 
5 
 
 
 
Question 9 
What are different data types in C language? 
Answer 
There are 4 basic data types in c 
● Int - size 4 byte 
● char - size 1 byte 
● float - size 4 byte 
● double - size 4 byte 
Question 10 
What are pointers in C? 
Answer 
Pointers are types of variables which are used ​to store address of another variable. ​They can 
only ​store address of variables of ​similar data type 
Question 11 
What are modifiers in language c? Explain different types of modifiers? 
Answer 
Modifiers are used to ​increase or decrease​ the ​size in memory​ and ​range ​of a variable. They are 
prefixed ​before the data type of the variable. 
Different types of modifiers in language c are 
● short 
● long 
● signed 
● Unsigned 
 
Visionard, your learning partner 
 
6 
 
 
 
 
Example 
● short int age = 5; 
● long int value = 10000; 
Question 12 
What are arrays? Why we need array? Explain different types of array! 
Answer 
An ​array ​are collection of similar data types. 
We need ​array​ for the following reason 
● Allocates contiguous block of memory 
● Makes our program efficient 
● Good to use when we have more than 1 variable of similar data types 
Types of array 
● Single dimension array or 1D array - they consists of just 1 row of similar data types 
● Multidimensional array consists of x rows and y columns of similar data types. 
Question 13 
What is the difference between call by value and call by reference? Explain with example! 
Answer 
Call by Value ​when you pass the ​copy of variable​ in the function call, it is known as call by 
value. In this method, any modification whatsoever are done in the duplicate copy of the 
variable. 
 
Visionard, your learning partner 
 
7 
 
 
 
Call by reference ​when you pass ​original value of the variable​ in the function call, it is also 
known as call by reference. In this method, any modification whatsoever are done in the ​original 
variable​ hence the changes are reflected in the original variable. 
 
 
Question 14 
What is stack? 
Answer 
Stack is a type of data structure which works on the principle of ​Last in first out(LIFO)​. Storing 
the data inside a stack is known as ​push​ while removing the data from stack is ​pop​. 
Question 15 
What is queue? 
Answer 
A ​queue​ is the type of data structure which works on the principle of ​First in first out(FIFO).​ The 
order of data insertion and deletions is on FIFO. 
Question 16 
What are linked list? 
Answer 
A linked list is type of data structure where current node is connected to the previous node. A 
basic linked list block consists of 2 part 
1) Previous address - this part contains the address of previous node 
2) Value - this part stores the value in the current node. 
Linked list are of 2 types 
 
Visionard, your learning partner 
 
8 
 
 
 
1. Singly Linked List 
2. Doubly Linked List 
Singly Linked list​ - It consists of only 2 part, previous address part to store address of previous 
block and data part to store the data. 
Doubly Linked List ​- It consists of 3 parts, previous address part to store address of previous 
block, data part to store the data and next address part to store the address of next block. 
Question 17 
What is dynamic memory allocation? 
Answer 
When you ​allocate memory​ during the ​run time​ of the program, it is known as ​dynamic memory 
allocation. ​There are 4 basic functions for dynamic memory allocation 
● malloc() 
● calloc() 
● free 
● Realloc 
These functions can be found in ​stdlib.h​ header file 
Question 18 
What is the difference between a ​structure ​and ​union​? 
Answer 
Union ​is user defined data type, which combines more than one data types as a single entity. 
The size of union is the size of the biggest data type inside that union 
Structure ​is a user defined data type, which combines more than one data types as a single 
entity. 
The size of ​structure ​is equal to the ​sum of all data types ​inside the structure. 
 
Visionard, your learning partner 
 
9 
 
 
 
Question 19 
Explain why c language is a case sensitive language with an example! 
Answer 
C language is a case sensitive language because variable names with different cases are 
different from each other. Example of different variables with same name but capital letter and 
small letters combination 
● Age ​is different from 
● aGE ​which is different from  
● AGe ​which is different from 
● agE ​which is different from 
● aGe ​which is different from  
● AgE ​which is different from 
● age ​which is different from ​AGE 
Question 20 
What is the difference between local variables and global variables? 
Answer 
Local variable ​are variables with ​scope limited to the block of code​, if a variable is declared 
inside the function, you can only access it inside the function. ​You cannot access​ local variables 
from outside the function.  
Global variable ​are variables with scope throughout the program. ​You can access​ the variable 
from any function or any block of code within the program. 
 
 
Visionard, your learning partner 
 
10 

More Related Content

What's hot

BERT Finetuning Webinar Presentation
BERT Finetuning Webinar PresentationBERT Finetuning Webinar Presentation
BERT Finetuning Webinar Presentationbhavesh_physics
 
Doppl development iteration #6
Doppl development   iteration #6Doppl development   iteration #6
Doppl development iteration #6Diego Perini
 
Python Interview questions 2020
Python Interview questions 2020Python Interview questions 2020
Python Interview questions 2020VigneshVijay21
 
C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1ReKruiTIn.com
 
C++ OOP Implementation
C++ OOP ImplementationC++ OOP Implementation
C++ OOP ImplementationFridz Felisco
 
2013 bookmatter learn_javaforandroiddevelopment
2013 bookmatter learn_javaforandroiddevelopment2013 bookmatter learn_javaforandroiddevelopment
2013 bookmatter learn_javaforandroiddevelopmentCarlosPineda729332
 
7. Trevor Cohn (usfd) Statistical Machine Translation
7. Trevor Cohn (usfd) Statistical Machine Translation7. Trevor Cohn (usfd) Statistical Machine Translation
7. Trevor Cohn (usfd) Statistical Machine TranslationRIILP
 
Mca 4030 programming in java
Mca 4030   programming in javaMca 4030   programming in java
Mca 4030 programming in javasmumbahelp
 
6. Khalil Sima'an (UVA) Statistical Machine Translation
6. Khalil Sima'an (UVA) Statistical Machine Translation6. Khalil Sima'an (UVA) Statistical Machine Translation
6. Khalil Sima'an (UVA) Statistical Machine TranslationRIILP
 
C++ Object Oriented Programming
C++  Object Oriented ProgrammingC++  Object Oriented Programming
C++ Object Oriented ProgrammingGamindu Udayanga
 
9781439035665 ppt ch03
9781439035665 ppt ch039781439035665 ppt ch03
9781439035665 ppt ch03Terry Yoast
 
Mca 4030 programming in java
Mca 4030   programming in javaMca 4030   programming in java
Mca 4030 programming in javasmumbahelp
 
5. manuel arcedillo & juanjo arevalillo (hermes) translation memories
5. manuel arcedillo & juanjo arevalillo (hermes) translation memories5. manuel arcedillo & juanjo arevalillo (hermes) translation memories
5. manuel arcedillo & juanjo arevalillo (hermes) translation memoriesRIILP
 

What's hot (20)

Overview of c#
Overview of c#Overview of c#
Overview of c#
 
C datatypes
C datatypesC datatypes
C datatypes
 
C program structure
C program structureC program structure
C program structure
 
BERT Finetuning Webinar Presentation
BERT Finetuning Webinar PresentationBERT Finetuning Webinar Presentation
BERT Finetuning Webinar Presentation
 
Doppl development iteration #6
Doppl development   iteration #6Doppl development   iteration #6
Doppl development iteration #6
 
Python Interview questions 2020
Python Interview questions 2020Python Interview questions 2020
Python Interview questions 2020
 
C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1
 
Latest trends in NLP - Exploring BERT
Latest trends in NLP -  Exploring BERTLatest trends in NLP -  Exploring BERT
Latest trends in NLP - Exploring BERT
 
C++ OOP Implementation
C++ OOP ImplementationC++ OOP Implementation
C++ OOP Implementation
 
2013 bookmatter learn_javaforandroiddevelopment
2013 bookmatter learn_javaforandroiddevelopment2013 bookmatter learn_javaforandroiddevelopment
2013 bookmatter learn_javaforandroiddevelopment
 
7. Trevor Cohn (usfd) Statistical Machine Translation
7. Trevor Cohn (usfd) Statistical Machine Translation7. Trevor Cohn (usfd) Statistical Machine Translation
7. Trevor Cohn (usfd) Statistical Machine Translation
 
Mca 4030 programming in java
Mca 4030   programming in javaMca 4030   programming in java
Mca 4030 programming in java
 
6. Khalil Sima'an (UVA) Statistical Machine Translation
6. Khalil Sima'an (UVA) Statistical Machine Translation6. Khalil Sima'an (UVA) Statistical Machine Translation
6. Khalil Sima'an (UVA) Statistical Machine Translation
 
C++ Object Oriented Programming
C++  Object Oriented ProgrammingC++  Object Oriented Programming
C++ Object Oriented Programming
 
C Course Material0209
C Course Material0209C Course Material0209
C Course Material0209
 
Turbo prolog 2.0 basics
Turbo prolog 2.0 basicsTurbo prolog 2.0 basics
Turbo prolog 2.0 basics
 
9781439035665 ppt ch03
9781439035665 ppt ch039781439035665 ppt ch03
9781439035665 ppt ch03
 
Mca 4030 programming in java
Mca 4030   programming in javaMca 4030   programming in java
Mca 4030 programming in java
 
5. manuel arcedillo & juanjo arevalillo (hermes) translation memories
5. manuel arcedillo & juanjo arevalillo (hermes) translation memories5. manuel arcedillo & juanjo arevalillo (hermes) translation memories
5. manuel arcedillo & juanjo arevalillo (hermes) translation memories
 
Python Tutorial for Beginner
Python Tutorial for BeginnerPython Tutorial for Beginner
Python Tutorial for Beginner
 

Similar to Top interview questions in c

Frequently asked tcs technical interview questions and answers
Frequently asked tcs technical interview questions and answersFrequently asked tcs technical interview questions and answers
Frequently asked tcs technical interview questions and answersnishajj
 
Java (1).ppt seminar topics engineering
Java (1).ppt  seminar topics engineeringJava (1).ppt  seminar topics engineering
Java (1).ppt seminar topics engineering4MU21CS023
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingHamad Odhabi
 
C programming interview questions
C programming interview questionsC programming interview questions
C programming interview questionsadarshynl
 
Cprogramminginterviewquestions 120622074544-phpapp01
Cprogramminginterviewquestions 120622074544-phpapp01Cprogramminginterviewquestions 120622074544-phpapp01
Cprogramminginterviewquestions 120622074544-phpapp01chandu_microcosm
 
Introduction to Prolog (PROramming in LOGic)
Introduction to Prolog (PROramming in LOGic)Introduction to Prolog (PROramming in LOGic)
Introduction to Prolog (PROramming in LOGic)Ahmed Gad
 
over all view programming to computer
over all view programming to computer over all view programming to computer
over all view programming to computer muniryaseen
 
Oop in c++ lecture 1
Oop in c++  lecture 1Oop in c++  lecture 1
Oop in c++ lecture 1zk75977
 
Bca winter 2013 2nd sem
Bca winter 2013 2nd semBca winter 2013 2nd sem
Bca winter 2013 2nd semsmumbahelp
 
pythontraining-201jn026043638.pptx
pythontraining-201jn026043638.pptxpythontraining-201jn026043638.pptx
pythontraining-201jn026043638.pptxRohitKumar639388
 
C++programing
C++programingC++programing
C++programingrmvvr143
 
SE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPTSE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPTnikshaikh786
 
Top C Language Interview Questions and Answer
Top C Language Interview Questions and AnswerTop C Language Interview Questions and Answer
Top C Language Interview Questions and AnswerVineet Kumar Saini
 
C question-bank-ebook
C question-bank-ebookC question-bank-ebook
C question-bank-ebooketrams1
 
Technical interview questions
Technical interview questionsTechnical interview questions
Technical interview questionsSoba Arjun
 

Similar to Top interview questions in c (20)

Frequently asked tcs technical interview questions and answers
Frequently asked tcs technical interview questions and answersFrequently asked tcs technical interview questions and answers
Frequently asked tcs technical interview questions and answers
 
Java (1).ppt seminar topics engineering
Java (1).ppt  seminar topics engineeringJava (1).ppt  seminar topics engineering
Java (1).ppt seminar topics engineering
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programming
 
C programming interview questions
C programming interview questionsC programming interview questions
C programming interview questions
 
Cprogramminginterviewquestions 120622074544-phpapp01
Cprogramminginterviewquestions 120622074544-phpapp01Cprogramminginterviewquestions 120622074544-phpapp01
Cprogramminginterviewquestions 120622074544-phpapp01
 
Introduction to Prolog (PROramming in LOGic)
Introduction to Prolog (PROramming in LOGic)Introduction to Prolog (PROramming in LOGic)
Introduction to Prolog (PROramming in LOGic)
 
over all view programming to computer
over all view programming to computer over all view programming to computer
over all view programming to computer
 
Oop in c++ lecture 1
Oop in c++  lecture 1Oop in c++  lecture 1
Oop in c++ lecture 1
 
Bca winter 2013 2nd sem
Bca winter 2013 2nd semBca winter 2013 2nd sem
Bca winter 2013 2nd sem
 
pythontraining-201jn026043638.pptx
pythontraining-201jn026043638.pptxpythontraining-201jn026043638.pptx
pythontraining-201jn026043638.pptx
 
Python training
Python trainingPython training
Python training
 
Unit 1
Unit 1Unit 1
Unit 1
 
JAVA
JAVAJAVA
JAVA
 
C++programing
C++programingC++programing
C++programing
 
C++programing
C++programingC++programing
C++programing
 
SE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPTSE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPT
 
Top C Language Interview Questions and Answer
Top C Language Interview Questions and AnswerTop C Language Interview Questions and Answer
Top C Language Interview Questions and Answer
 
C question-bank-ebook
C question-bank-ebookC question-bank-ebook
C question-bank-ebook
 
Introduction to ‘C’ Language
Introduction to ‘C’ LanguageIntroduction to ‘C’ Language
Introduction to ‘C’ Language
 
Technical interview questions
Technical interview questionsTechnical interview questions
Technical interview questions
 

Recently uploaded

Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 

Recently uploaded (20)

Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 

Top interview questions in c

  • 1.       Visionard   Humans + Technology = Great Combination  Top interview questions in C  Duration​ 1 Hour  Difficulty Level​ Beginner        Visionard, your learning partner    1 
  • 2.       Question 1  What are the features of C language?  Answer  C language has many inbuilt features such as  ● It combines features of assembly language and high level language.  ● Easy to program​ - C languages has data types and different operators, which makes  easier to write complex program  ● Portable​ - Program written on C are portable, hence can be used in other computer with  no modification  ● Easy to extends​ - You can easily create your own functions and libraries in C language.  ● Very fast​ - Program written in c are very fast to run with no delay  ● Rich set of libraries ​- C languages has rich set of libraries, which makes coding complex  program easier.  Question 2  What is the difference between source code and object code?  Answer  Source code​ is the code which is written by the programmer, it consists of all the functions,  conditional statements and libraries. Only a human being can read this code while computer  cannot read this code.   Source code ​extension ​in c language is ​.c  Object code​ when you compile the source code, you get the object code. The format of the code  is only computer readable.   Object code ​extension ​in language is ​.obj      Visionard, your learning partner    2 
  • 3.         Question 3  What is the difference between ​= ​and ​== ​?  Answer  = ​is also known as ​assignment operator​ which is used to assign a value to the variable  == ​is also known as ​comparison operator ​which is used to compare two values in a conditional  statement.  Question 4  What is a header file and why we need header file in C program?  Answer   A ​header file​ are also known as ​library​. They contain ​definition ​and ​prototype ​of the ​inbuilt  functions. ​Header files have ​.h ​as their file extension.  We need header files so, we can use functions which are inbuilt within the language.  Example  studio.h ​contains functions like ​printf()  Question 5  What is the difference between ​syntax error, run-time error ​and ​logical error?  Answer  Syntax error ​occurs when we make mistakes in the syntax of c program. This error is shown  when we try to compile our program, so it is also known as ​compile time error.   Example  ● A missing semicolon    Visionard, your learning partner    3 
  • 4.       Run-time error ​occurs during the execution of our program after successful compilation. A  compiler cannot find them so they are very hard to find, as they only occur during the run time of  the program.  Example  ● Dividing a number with 0  Logical Error ​occurs when you get different output based on the input. Major cause of this error  is logic created by the programmer. They are again hard to find and cannot be detected by the  compiler.  Example  ● A sum of 2 number returning a negative value.  Question 6  Why C language is known as middle level language?  OR  What type of language is C language? Low level, middle level or high level?  Answer  C language is known as ​middle level language ​because it can access ​machine level(low level)  features like accessing structure of the memory just like assembly language.  But also acts as high level language in which you can use english language to write your  program.            Visionard, your learning partner    4 
  • 5.       Question 7  What is the difference between i++ and ++i?  OR  What is the difference between​ post increment operator​ and ​pre increment operator​?  Answer  Post increment operator or i++  In this, we first assign the value and then increment the value by one  Pre increment operator or ++i  In this, we first increment the value by one and then assign the value.  Question 8  What is the difference between ​actual parameters​ and ​formal parameters​?  Answer  Actual Parameters ​are passed when you call the function in your program.  Formal Parameters​ are parameters which are given in the prototype and definition of the  function.    Visionard, your learning partner    5 
  • 6.       Question 9  What are different data types in C language?  Answer  There are 4 basic data types in c  ● Int - size 4 byte  ● char - size 1 byte  ● float - size 4 byte  ● double - size 4 byte  Question 10  What are pointers in C?  Answer  Pointers are types of variables which are used ​to store address of another variable. ​They can  only ​store address of variables of ​similar data type  Question 11  What are modifiers in language c? Explain different types of modifiers?  Answer  Modifiers are used to ​increase or decrease​ the ​size in memory​ and ​range ​of a variable. They are  prefixed ​before the data type of the variable.  Different types of modifiers in language c are  ● short  ● long  ● signed  ● Unsigned    Visionard, your learning partner    6 
  • 7.         Example  ● short int age = 5;  ● long int value = 10000;  Question 12  What are arrays? Why we need array? Explain different types of array!  Answer  An ​array ​are collection of similar data types.  We need ​array​ for the following reason  ● Allocates contiguous block of memory  ● Makes our program efficient  ● Good to use when we have more than 1 variable of similar data types  Types of array  ● Single dimension array or 1D array - they consists of just 1 row of similar data types  ● Multidimensional array consists of x rows and y columns of similar data types.  Question 13  What is the difference between call by value and call by reference? Explain with example!  Answer  Call by Value ​when you pass the ​copy of variable​ in the function call, it is known as call by  value. In this method, any modification whatsoever are done in the duplicate copy of the  variable.    Visionard, your learning partner    7 
  • 8.       Call by reference ​when you pass ​original value of the variable​ in the function call, it is also  known as call by reference. In this method, any modification whatsoever are done in the ​original  variable​ hence the changes are reflected in the original variable.      Question 14  What is stack?  Answer  Stack is a type of data structure which works on the principle of ​Last in first out(LIFO)​. Storing  the data inside a stack is known as ​push​ while removing the data from stack is ​pop​.  Question 15  What is queue?  Answer  A ​queue​ is the type of data structure which works on the principle of ​First in first out(FIFO).​ The  order of data insertion and deletions is on FIFO.  Question 16  What are linked list?  Answer  A linked list is type of data structure where current node is connected to the previous node. A  basic linked list block consists of 2 part  1) Previous address - this part contains the address of previous node  2) Value - this part stores the value in the current node.  Linked list are of 2 types    Visionard, your learning partner    8 
  • 9.       1. Singly Linked List  2. Doubly Linked List  Singly Linked list​ - It consists of only 2 part, previous address part to store address of previous  block and data part to store the data.  Doubly Linked List ​- It consists of 3 parts, previous address part to store address of previous  block, data part to store the data and next address part to store the address of next block.  Question 17  What is dynamic memory allocation?  Answer  When you ​allocate memory​ during the ​run time​ of the program, it is known as ​dynamic memory  allocation. ​There are 4 basic functions for dynamic memory allocation  ● malloc()  ● calloc()  ● free  ● Realloc  These functions can be found in ​stdlib.h​ header file  Question 18  What is the difference between a ​structure ​and ​union​?  Answer  Union ​is user defined data type, which combines more than one data types as a single entity.  The size of union is the size of the biggest data type inside that union  Structure ​is a user defined data type, which combines more than one data types as a single  entity.  The size of ​structure ​is equal to the ​sum of all data types ​inside the structure.    Visionard, your learning partner    9 
  • 10.       Question 19  Explain why c language is a case sensitive language with an example!  Answer  C language is a case sensitive language because variable names with different cases are  different from each other. Example of different variables with same name but capital letter and  small letters combination  ● Age ​is different from  ● aGE ​which is different from   ● AGe ​which is different from  ● agE ​which is different from  ● aGe ​which is different from   ● AgE ​which is different from  ● age ​which is different from ​AGE  Question 20  What is the difference between local variables and global variables?  Answer  Local variable ​are variables with ​scope limited to the block of code​, if a variable is declared  inside the function, you can only access it inside the function. ​You cannot access​ local variables  from outside the function.   Global variable ​are variables with scope throughout the program. ​You can access​ the variable  from any function or any block of code within the program.      Visionard, your learning partner    10