| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| WRITE A PROGRAM TO FIND A REVERSE OF TWO NO | | 5 |
| What's a "sequence point"? | | 2 |
| which of the function operator cannot be over loaded
a) <=
b)?:
c)==
d)*
| HCL | 7 |
| Print all numbers which has a certain digit in a certain
position
eg:
number=45687
1 number=4
2 number=5
etc | | 2 |
| why we shiuld use main keyword in C | | 5 |
| writw a program to insert an element in the begning of a
doubly linked list | | 1 |
| Which of the following is not an infinite loop ?
a.while(1){
....
}
b.for(;;){
...
}
c.x=0;
do{
/*x unaltered within theloop*/
...
}while(x==0);
d.# define TRUE 0
...
while(TRUE){
....
}
| TCS | 4 |
| struct ptr
{
int a;
char b;
int *p;
}abc;
what is d sizeof structure without using "sizeof" operator?? | Verifone | 8 |
| What is RAM memory? and What is ROM?Who designed one is
temparary and another is permanent?why they designed like
that?By using far pointer which type data(whether
hexadecimal)we can access? | Excel | 1 |
| If "AaBbCc" is passed to the char
char x(*a)
{
a[0]?x(a+1):1;
printf("%c",a[0]);
return 1;
}
what will be the output?
| Hughes | 5 |
| enum colors {BLACK,BLUE,GREEN}
main()
{
printf("%d..%d..%d",BLACK,BLUE,GREEN);
return(1);
}
| ME | 3 |
| write a C code To reverse a linked list | Motorola | 2 |
| What will be the output of
x++ + ++x? | MBT | 13 |
| What kind of sorting is this?
SORT (k,n)
1.[Loop on I Index]
repeat thru step2 for i=1,2,........n-1
2.[For each pass,get small value]
min=i;
repeat for j=i+1 to N do
{
if K[j]<k[min]
min=j;
}
temp=K[i];K[i]=K[min];K[min]=temp;
3.[Sorted Values will be returned]
A)Bubble Sort
B)Quick Sort
C)Selection Sort
D)Merge Sort | Accenture | 3 |
| A function 'q' that accepts a pointer to a character as
argument and returns a pointer to an array of integer can
be declared as:
A)int (*q(char*)) []
B)int *q(char*) []
C)int(*q)(char*) []
D)None of the Above
| Accenture | 2 |
| write a program for size of a data type without using
sizeof() operator? | | 7 |
| How can I invoke another program from within a C program? | | 6 |
| can we print any string in c language without using
semicolon(;)(terminator) in whole program. | | 6 |
| why the execution starts from main function | | 9 |
| If we have an array of Interger values, find out a sub array
which has a maximum value of the array and start and end
positions of the array..The sub array must be contiguious.
Take the start add to be 4000.
For Ex if we have an array arr[] =
{-1,-2,-5,9,4,3,-6,8,7,6,5,-3}
here the sub array of max would be
{8,7,6,5} coz the sum of max contiguous array is 8+7+6+5 =
26.The start and end position is 4014(8) and 4020(5). | Microsoft | 4 |
| |
| For more C Interview Questions Click Here |