| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| HOW TO ANSWER IF ASKED " WHAT KIND OF A PERSON ARE YOU?" I
NEED AN ANSWER THAT IMPRESS THE INTERVIEWER | | 2 |
| What is false about the following
A compound statement is
a.A set of simple statments
b.Demarcated on either side by curly brackets
c.Can be used in place of simple statement
d.A C function is not a compound statement.
| TCS | 1 |
| define function | Assurgent | 4 |
| How can I call a function, given its name as a string? | ABC-Telecom | 2 |
| How can I prevent other programmers from violating
encapsulation by seeing the private parts of my class? | | 1 |
| pgm to reverse string using arrays i.e god is love becomes
love is god)
(assumption:only space is used for seperation of words)
no addtional memory used.i.e no temporary arrays can used. | Persistent | 4 |
| What is meant by
int fun const(int a, int b) {
....
...
}
| | 1 |
| How many types of linked lists what are they?
How many types of data structures? | BSNL | 5 |
| How the C program can be compiled? | HP | 7 |
| How can draw a box in cprogram without using graphics.h
header file & using only one printf(); ? | NIIT | 1 |
| How does C++ help with the tradeoff of safety vs. usability?
| | 1 |
| How to add two numbers without using arithmetic operators? | Sapient | 11 |
| what is the difference b/w compiler and debugger? | Assurgent | 1 |
| HOW TO HANDLE EXCEPTIONS IN C | | 5 |
| 9.how do you write a function that takes a variable number
of arguments? What is the prototype of printf () function?
10.How do you access command-line arguments?
11.what does ‘#include<stdio.h>’ mean?
12.what is the difference between #include<> and #include”…”?
13.what are # pragma staments?
14.what is the most appropriate way to write a
multi-statement macro? | L&T | 4 |
| void main()
{
int s[4][2]={ {1234,56},{1212,33},{1434,80},{1312,78} };
int (*p)[2];
int i,j,*pint;
for(i=0;i<=3;i++)
{
p=&s[i];
pint=p;
printf("\n");
for(j=0;j<=1;j++)
printf("%d",*(pint+j));
}
} while running this program it shows a warning-suspicious
pointer conversion ie pint=p; my que is why should we assign
the value of p to pint again.why cant we use it directly as
*(p+j)..but if i use like tat the o/p is garbage value.. | | 1 |
| main()
{
printf(5+"Vidyarthi Computers");
} | | 6 |
| 2.main
{
int x,j,k;
j=k=6;x=2;
x=j*k;
printf("%d", x);
| HCL | 6 |
| How do we swap or interchange any 2 numbers without using
Temporary variable...Anybody can pls answer it.. Thanks in
Advance | | 7 |
| the operator for exponencation is
a.**
b.^
c.%
d.not available
| TCS | 4 |
| |
| For more C Interview Questions Click Here |