| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| C program code
int zap(int n)
{
if(n<=1)then zap=1;
else zap=zap(n-3)+zap(n-1);
}
then the call zap(6) gives the values of zap
[a] 8 [b] 9 [c] 6 [d] 12 [e] 15
| Wipro | 4 |
| HOW DO YOU HANDLE EXCEPTIONS IN C?
| AppLabs | 2 |
| how to exchnage bits in a byte
b7<-->b0 b6<-->b1 b5<-->b2 b4<-->b3
please mail me the code if any one know to
rajeshmb4u@gmail.com | Honeywell | 3 |
| how the size of an integer is decided?
- is it based on processor or compiler or OS? | nvidia | 16 |
| How can I return multiple values from a function? | | 4 |
| how many argument we can pas in in a function | CTS | 20 |
| Write a C program that reads a series of strings and prints
only those ending in "ed" | | 2 |
| Function to find the given number is a power of 2 or not? | Motorola | 12 |
| Study the code:
void show()
main()
{
show();
}
void show (char *s)
{
printf("%sn",s);
}
What will happen if it is compiled & run on an ANSI C
Compiler?
A)It will compile & nothing will be printed when it is
executed
B)it will compile but not link
C)the compiler will generate an error
D)the compiler will generate a warning
| Accenture | 4 |
| what is differnence b/w macro & functions | | 1 |
| difference between function & structure | Verizon | 5 |
| plz answer..... a program that reads non-negative integer
and computes and prints its factorial | | 2 |
| Write a c code segment using a for loop that calculates and
prints the sum of the even integers from 2 to 30, inclusive? | | 2 |
| Why is conio.h not required when we save a file as .c and
use clrscr() or getch() ? | | 2 |
| main()
{
int x=5;
printf("%d %d %d\n",x,x<<2,x>>2);
}
what is the output? | Ramco | 7 |
| how to generate the length of a string without using len
funtion? | | 3 |
| Please list all the unary and binary operators in C. | | 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 |
| let's take a code
struct FAQ
{
int a;
char b;
float c;
double d;
int a[10];
}*temp;
now explain me how the memory will be allocated for the
structure FAQ and what address will be in the structure
pointer (temp).................... | | 7 |
| what is the use of getch() function in C program..
difference b/w getch() and getche()?? | Wipro | 12 |
| |
| For more C Interview Questions Click Here |