| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| macros and function are related in what aspect?
a)recursion b)varying no of arguments
c)hypochecking d)type declaration
| HCL | 8 |
| what is the difference between. system call and library
function? | CDAC | 2 |
| What is encapsulation? | | 1 |
| which one is highest Priority in c?
a)=,b)+,c)++,d)== | | 3 |
| without using arithmatic operator convert an intger variable
x into x+1 | | 1 |
| How to implement call back functions ? | HP | 2 |
| write a program to swap bits in a character and return the value
prototype of function
char fun (char a, charb flag c)
where fun returns a char, char a is a the value char b is
the bit to be changed and flag c is the bit value
for eg: x=fun(45,7,0)
since 45 is 0010 0101
and ow x should contain the value 65 (0110 0101) | Bosch | 1 |
| 2. What is the function of ceil(X) defined in math.h do?
A)It returns the value rounded down to the next lower
integer
B)it returns the value rounded up to the next higher integer
C)the Next Higher Value
D)the next lower value
| Accenture | 2 |
| Write code for finding depth of tree | Adobe | 1 |
| Write a routine that prints out a 2-D array in spiral order! | Lucent | 1 |
| what are brk, sbrk?
| Oracle | 1 |
| how many times of error occur in C | | 7 |
| i=20,k=0;
for(j=1;j<i;j=1+4*(i/j))
{
k+=j<10?4:3;
}
printf("%d", k);
| HCL | 6 |
| i want explaination about the program and its stack reprasetaion
fibbo(int n)
{
if(n==1 or n==0)
return n;
else
return fibbo(n-1)+fibbo(n-2);
}
main()
{
fibbo(6);
}
| | 2 |
| Which command is more efficient?
*(ptr+1) or ptr[1] | | 3 |
| what is the size of an integer variable? | | 1 |
| what is pointer | TCS | 1 |
| 2. Counting in Lojban, an artificial language developed
over the last fourty years, is easier than in most languages
The numbers from zero to nine are:
0 no
1 pa
2 re
3 ci
4 vo
5 mk
6 xa
7 ze
8 bi
9 so
Larger numbers are created by gluing the digit togather.
For Examle 123 is pareci
Write a program that reads in a lojban string(representing
a no less than or equal to 1,000,000) and output it in
numbers.
| Nagarro | 2 |
| x=2,y=6,z=6
x=y==z;
printf(%d",x)
| HCL | 8 |
| How can I find out how much memory is available? | Persistent | 1 |
| |
| For more C Interview Questions Click Here |