| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Write one statement equalent to the following two statements
x=sqr(a);
return(x);
Choose from one of the alternatives
a.return(sqr(a));
b.printf("sqr(a)");
c.return(a*a*a);
d.printf("%d",sqr(a));
| TCS | 4 |
| explain memory layout of a C program | | 1 |
| Which of the following data structures is on average the
fastest for retrieving data:
1) Binary Tree
2) Hash Table
3) Stack
| | 3 |
| Write a routine that prints out a 2-D array in spiral order! | Lucent | 1 |
| write an algorithm which can find the largest number among
the given list using binary search ...............
this was asked in the interview | Satyam | 2 |
| Will Macros support multiple arguments ?
| Oracle | 7 |
| can we access one file to one directory? | | 1 |
| which of the following go out of the loopo if expn 2
becoming false
a.while(expn 1){...if(expn 2)continue;}
b.while(!expn 1){if(expn 2)continue;...}
c.do{..if(expn 1)continue;..}while(expn 2);
d.while(!expn 2){if(expn 1)continue;..}
| TCS | 2 |
| write a program to find the number of even integers and odd
integers in a given array in c language | Olive-Tech | 2 |
| how to return 1000 variables from functio9n in c?plz give me
code also | | 5 |
| what is the maximum no. of bytes calloc can allocate | Mphasis | 2 |
| how to print value of e(exp1)up to required no of digits
after decimal? | | 1 |
| Why is conio.h not required when we save a file as .c and
use clrscr() or getch() ? | | 2 |
| i want to job in your company, so how it will be possible. | TCS | 2 |
| Tell us the difference between these two :
#include"stdio.h"
#include<stdio.h>
define in detial. | | 4 |
| main()
{
int i=1;
while (i<=5)
{
printf("%d",i);
if (i>2)
goto here;
i++;
}
}
fun()
{
here:
printf("PP");
}
| ME | 3 |
| main()
{
printf(5+"good morning");
printf("%c","abcdefgh"[4]);
}the o/p is morning and e...how someone explain | | 1 |
| Which of these statements are false w.r.t File Functions?
i)fputs() ii)fdopen() iii)fgetpos() iv)ferror()
A)ii B)i,ii C)iii D)iv
| Accenture | 5 |
| how to implement stack operation using singly linked list | | 1 |
| 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 |
| |
| For more C Interview Questions Click Here |