Professional Documents
Culture Documents
C Interview Questions PDF For Freshers
C Interview Questions PDF For Freshers
C Programming
Interview Questions
w i t h a n s w e r s
Basic Level
3. What is a token?
Answer:
The individual elements of a program are called Tokens. There are
following 6 types of tokens are available in C:
Identifiers
Keywords
Constants
Operators
Special Characters
Strings
Page no: 2
Get free mentorship
from experts?
of Aptitude and Technical skills C++, Java, Python, DSA, CN, OS, DBMS,
After knowing the current level it will Quant, Reasoning, and verbal ability.
become easy for a student to start their Topic-wise questions in every test will help
placement preparation students get strong and weak points
Built-function is also known as library functions that are provided by the system
to make the life of a developer easy by assisting them to do certain commonly
used predefined tasks. For example, if you need to print output or your program
into the terminal, we use printf() in C.
Page no: 4
Join WhatsApp Group for
Placement
9. What is recursion in C?
Answer:
The function that calls itself is known as a recursive function.
Syntax
void recursion()
{
... .. ...
recursion();
... .. ...]
}
int main()
{
... .. ...
recursion();
... .. ...
}
9. What is recursion in C?
Answer:
The function that calls itself is known as a recursive function.
Syntax
void recursion()
{
... .. ...
recursion();
... .. ...]
} Page no: 5
int main()
Get free mentorship
from experts?
10. What is the difference between global int and static int
declaration?
Answer:
A truly global variable has a global scope and is visible everywhere in your
program. A static variable has a local scope but its variables are not allocated in
the stack segment of the memory.
Page no: 6
Follow us on Instagram
Example Program
#include <stdio.h>
int main()
{
int *ptr; //pointer of type integer.
int a=15;
ptr=&a;
printf("Address value of 'a' variable is %p",ptr);
return 0;
}
The output of above program is
Page no: 7
Join WhatsApp Group for
Placement
Intermediate Level
When you compile a C source, symbol names will remain intact. If you
introduce function overloading, you should provide a name mangling
technique to prevent name clashes. Consequently, like C++, you'll have
machine-generated symbol names in the compiled binary.
Additionally, C does not feature strict typing. Many things are implicitly
convertible to each other in C. The complexity of overload resolution rules
could introduce confusion in such kind of language
Page no: 8
Get free mentorship
from experts?
For example,
#include<stdio.h>
void main()
{
int *p = malloc(constant value);
free(p);
}
In the above example, initially memory is allocated to the pointer variable p, and
then the memory is deallocated from the pointer variable. Now, pointer variable,
i.e., p becomes a dangling pointer.
Page no: 10
Join WhatsApp Group for
Placement
Page no: 11
Get free mentorship
from experts?
Syntax
struct structure_name
{
Member_variable1;
Member_variable2
.
.
}[structure variables];
Place
d in A Rohit Borse
ccent
ure
Shrinija
Kalluri 6.5 LP
Placed in
Oracle A
9 LPA
Page no: 12
Follow us on Instagram
Page no: 13
Join WhatsApp Group for
Placement
Advanced Level
36. What is the difference between near, far and huge pointers?
Answer:
▪A virtual address is composed of the selector and offset.
▪A near pointer doesn't have explicit selector whereas far, and huge pointers
have explicit selector. When you perform pointer arithmetic on the far pointer,
the selector is not modified, but in case of a huge pointer, it can be modified.
▪ These are the non-standard keywords and implementation specific. These are
irrelevant in a modern platform.
Page no: 14
Get free mentorship
from experts?
Page no: 16
Join WhatsApp Group for
Placement
Page no: 17
Get free mentorship
from experts?
45. What are header files and what are its uses in C programming?
Answer:
In C header files must have the extension as .h, which contains function
definitions, data type definitions, macro, etc. The header is useful to import the
above definitions to the source code using the #include directive. For example,
if your source code needs to take input from the user do some manipulation
and print the output on the terminal, it should have stdio.h file included as
#include <stdio.h>, with which we can take input using scanf() do some
manipulation and print using printf().
Page no: 19
Join WhatsApp Group for
Placement
{
r=n%10;
sum=sum+(r*r*r);
n=n/10;
}
if(temp==sum)
printf("armstrong number ");
else
printf("not armstrong number");
getch();
}
Talent Battle is
associated with TCS iON
for content partnership &
providing internships to
students across India.
Page no: 20
Get free mentorship
from experts?
Page no: 21
Introducing...
Complete Placement
Preparatory Masterclass
What is included?
400+ Hours Foundation of LIVE + Recorded
Training on Quant, Reasoning, Verbal, C, C++,
Java, Python, DSA, OS, CN, DBMS
97.6% 4.91 / 5
Selection Ratio Overall Rating
of Complete Masterclass Students out of 5
JOIN NOW
Our Team
Industry Mentors
@talentbattle.in
@talentbattle_2023
@talentbattle_2024
@talentbattle_2025
@talentbattle_2026
WhatsApp Group
Free Mentorship
Talent Battle Facebook
Talent Battle YouTube
Talent Battle LinkedIn
https://talentbattle.in/