C Interview Questions
Quick Revision Summary
C Interview Questions For Recent graduates and Experienced professionals to gain the knowledge for the C Interview. 1: swap(int x,y) { int temp; temp=x; x=y; y=temp; } main() { ...
Interactive Practice Mode
Formulate your thoughts or take notes before revealing the model solution.
Saved automatically
Model Answer & Deep-Dive Explanation
C Interview Questions For Recent graduates and Experienced professionals to gain the knowledge for the C Interview. 1:
swap(int x,y)
{
int temp;
temp=x;
x=y;
y=temp;
}
main()
{
int x=2;y=3;
swap(x,y);
}2:
struct base {int a,b;
base();
int virtual function1();
}
struct derv1:base{
int b,c,d;
derv1()
int virtual function1();
}
struct derv2 : base
{int a,e;
}
base::base()
{
a=2;b=3;
}
derv1::derv1(){
b=5;
c=10;d=11;}
base::function1()
{retu
(100);
}
derv1::function1()
{
retu
(200);
}
main()
base ba;
derv1 d1,d2;
printf("%d %d",d1.a,d1.b)3:
struct base {int a,b;
base();
int virtual function1();
}
struct derv1:base{
int b,c,d;
derv1()
int virtual function1();
}
struct derv2 : base
{int a,e;
}
base::base()
{
a=2;b=3;
}
derv1::derv1(){
b=5;
c=10;d=11;}
base::function1()
{retu
(100);
}
derv1::function1()
{
retu
(200);
}
main()
base ba;
derv1 d1,d2;
printf("%d %d",d1.a,d1.b)4: for the above program answer the following q's
main()
base da;
derv1 d1;
derv2 d2;
printf("%d %d %d",da.function1(),d1.function1(),d2.function1());struct {
int x;
int y;
}abc;Interviewer Evaluation Points & Scoring Rubric
- 1 Structure answer clearly: Core concept, Practical example, and Pitfalls to avoid.
- 2 Demonstrate clear communication without unnecessary buzzwords.
- 3 Relate concept to real-world software development scenarios.
Related Questions in Unix / Linux
Unix/Linux administration interview questions
Advanced level • 832 views
Linux admin interview questions
Intermediate level • 749 views
Nix Application Programming
Intermediate level • 706 views
Unix/Linux programming interview questions
Intermediate level • 575 views
Php and MySQL Important Questions
Advanced level • 511 views