| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| program to get the remainder and quotant of given two
numbers with out using % and / operators? | IBM | 8 |
| i=20,k=0;
for(j=1;j<i;j=1+4*(i/j))
{
k+=j<10?4:3;
}
printf("%d", k);
| HCL | 6 |
| write a program to compare 2 numbers without using logical
operators? | IBM | 1 |
| How can I call a function, given its name as a string? | ABC-Telecom | 2 |
| What is the output of following program ?
int
main()
{
int x = 5;
printf("%d %d %d\n", x, x << 2, x >> 2);
} | Qualcomm | 3 |
| #define DCHAR char*
typedef char* TCHAR;
if using these following variables will be declared like
DCHAR ch1, ch2;
TCHAR ch3, ch4;
then what will be types of ch1, ch2, ch3 and ch4?
| NDS | 1 |
| what is the difference b/w compiler and debugger? | Assurgent | 1 |
| Name the language in which the compiler of "c" in written? | Bajaj | 1 |
| Difference Between embedded software and soft ware? | Bosch | 1 |
| what is the output of the following code?
main()
{
int I;
I=0x10+010+10;
printf("x=%x",I);
}
give detailed reason | | 3 |
| Write a program for the following series?
1
121
12321
1234321
123454321
12345654321
1234567654321
123456787654321
12345678987654321
1234567890987654321
123456789010987654321
12345678901210987654321
1234567890123210987654321
.........1234321............
..........123454321............
..........12345654321............
7
8
9
0
1
Pls............? | | 2 |
| struct ptr
{
int a;
char b;
int *p;
}abc;
what is d sizeof structure without using "sizeof" operator?? | Verifone | 8 |
| 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 |
| what is calloc and malloc? | | 1 |
| if array a conatins 'n' elements and array b conatins 'n-1'
elements.array b has all element which are present in array
a but one element is missing in array b. find that
element. | Zycus-Infotech | 9 |
| a memory of 20 bytes is allocated to a string declared as
char *s then the following two statements are executed:
s="Etrance"
l=strlen(s);
what is the value of l ?
a.20
b.8
c.9
d.21
| TCS | 4 |
| write a c program to check weather a particluar bit is set
or not? | IBM | 4 |
| How the C program can be compiled? | HP | 7 |
| write a C code
to reverse a string using a recursive function, without
swapping or using an extra memory.
| Motorola | 2 |
| What are the languages are portable and platform
independent?Why they are like that? | Excel | 1 |
| |
| For more C Interview Questions Click Here |