SlideShare a Scribd company logo
 
 
 
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

Overview of c#
Overview of c#Overview of c#
Overview of c#
Prasanna Kumar SM
 
C datatypes
C datatypesC datatypes
C datatypes
ArghodeepPaul
 
C program structure
C program structureC program structure
C program structure
ArghodeepPaul
 
BERT Finetuning Webinar Presentation
BERT Finetuning Webinar PresentationBERT Finetuning Webinar Presentation
BERT Finetuning Webinar Presentation
bhavesh_physics
 
Doppl development iteration #6
Doppl development   iteration #6Doppl development   iteration #6
Doppl development iteration #6
Diego Perini
 
Python Interview questions 2020
Python Interview questions 2020Python Interview questions 2020
Python Interview questions 2020
VigneshVijay21
 
C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1
ReKruiTIn.com
 
Latest trends in NLP - Exploring BERT
Latest trends in NLP -  Exploring BERTLatest trends in NLP -  Exploring BERT
Latest trends in NLP - Exploring BERT
Silversparro Technologies
 
C++ OOP Implementation
C++ OOP ImplementationC++ OOP Implementation
C++ OOP Implementation
Fridz Felisco
 
2013 bookmatter learn_javaforandroiddevelopment
2013 bookmatter learn_javaforandroiddevelopment2013 bookmatter learn_javaforandroiddevelopment
2013 bookmatter learn_javaforandroiddevelopment
CarlosPineda729332
 
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
RIILP
 
Mca 4030 programming in java
Mca 4030   programming in javaMca 4030   programming in java
Mca 4030 programming in java
smumbahelp
 
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
RIILP
 
C++ Object Oriented Programming
C++  Object Oriented ProgrammingC++  Object Oriented Programming
C++ Object Oriented Programming
Gamindu Udayanga
 
C Course Material0209
C Course Material0209C Course Material0209
C Course Material0209
chameli devi group of institutions
 
Turbo prolog 2.0 basics
Turbo prolog 2.0 basicsTurbo prolog 2.0 basics
Turbo prolog 2.0 basics
Soham Kansodaria
 
9781439035665 ppt ch03
9781439035665 ppt ch039781439035665 ppt ch03
9781439035665 ppt ch03
Terry Yoast
 
Mca 4030 programming in java
Mca 4030   programming in javaMca 4030   programming in java
Mca 4030 programming in java
smumbahelp
 
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
RIILP
 
Python Tutorial for Beginner
Python Tutorial for BeginnerPython Tutorial for Beginner
Python Tutorial for Beginner
rajkamaltibacademy
 

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 answers
nishajj
 
Java (1).ppt seminar topics engineering
Java (1).ppt  seminar topics engineeringJava (1).ppt  seminar topics engineering
Java (1).ppt seminar topics engineering
4MU21CS023
 
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
Hamad Odhabi
 
C programming interview questions
C programming interview questionsC programming interview questions
C programming interview questions
adarshynl
 
Cprogramminginterviewquestions 120622074544-phpapp01
Cprogramminginterviewquestions 120622074544-phpapp01Cprogramminginterviewquestions 120622074544-phpapp01
Cprogramminginterviewquestions 120622074544-phpapp01
chandu_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 1
zk75977
 
Bca winter 2013 2nd sem
Bca winter 2013 2nd semBca winter 2013 2nd sem
Bca winter 2013 2nd sem
smumbahelp
 
pythontraining-201jn026043638.pptx
pythontraining-201jn026043638.pptxpythontraining-201jn026043638.pptx
pythontraining-201jn026043638.pptx
RohitKumar639388
 
Python training
Python trainingPython training
Python training
Kunalchauhan76
 
Unit 1
Unit 1Unit 1
Unit 1
ankita1317
 
JAVA
JAVAJAVA
C++programing
C++programingC++programing
C++programing
rmvvr143
 
C++programing
C++programingC++programing
C++programing
amol kanvate
 
SE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPTSE-IT JAVA LAB OOP CONCEPT
SE-IT JAVA LAB OOP CONCEPT
nikshaikh786
 
C question-bank-ebook
C question-bank-ebookC question-bank-ebook
C question-bank-ebook
etrams1
 
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
Vineet Kumar Saini
 
Introduction to ‘C’ Language
Introduction to ‘C’ LanguageIntroduction to ‘C’ Language
Introduction to ‘C’ Language
Thesis Scientist Private Limited
 
Technical interview questions
Technical interview questionsTechnical interview questions
Technical interview questions
Soba 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
 
C question-bank-ebook
C question-bank-ebookC question-bank-ebook
C question-bank-ebook
 
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
 
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

Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
ZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptxZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptx
dot55audits
 
Constructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective CommunicationConstructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective Communication
Chevonnese Chevers Whyte, MBA, B.Sc.
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
ssuser13ffe4
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 

Recently uploaded (20)

Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
ZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptxZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptx
 
Constructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective CommunicationConstructing Your Course Container for Effective Communication
Constructing Your Course Container for Effective Communication
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
math operations ued in python and all used
math operations ued in python and all usedmath operations ued in python and all used
math operations ued in python and all used
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 

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