| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| write a program to search for an element in a given array.
If the array was found then display its position otherwise
display appropriate message in c language | | 3 |
| void swap(int a,int b)
{
a=a+b;
b=a-b;
a=a-b;
}
in this code always gives the same result for all case | TCS | 7 |
| logic for generating all the combinations of the any number
of given letters.
ex:::::::::
if a,b,c,d are given the o/p should be
abcd,dcba,dbac,bcad,................
4*3*2*1 combinations............ | Infosys | 2 |
| write a C program to print the program itself ?! | TCS | 11 |
| what is available in C language but not in C++? | | 1 |
| how to implement stack work as a queue? | | 2 |
| program to get the remainder and quotant of given two
numbers with out using % and / operators? | IBM | 8 |
| wt is d full form of c | Wipro | 1 |
| What are the phases in s/w developed life cycle?
wat is the diff b/w stack & queue...where do we use stack | | 5 |
| How can I find out how much memory is available? | Persistent | 1 |
| Can I pass constant values to functions which accept structure
arguments? | | 2 |
| How to avoid structure padding in C? | Tech-Mahindra | 4 |
| how to do in place reversal of a linked list(singly or
doubly)? | | 2 |
| long int size
a) 4 bytes b) 2 bytes c) compiler dependent d) 8 bytes
| HCL | 11 |
| What is the output for the program given below
typedef enum grade{GOOD,BAD,WORST,}BAD;
main()
{
BAD g1;
g1=1;
printf("%d",g1);
}
| ADITI | 3 |
| Name the language in which the compiler of "c" in written? | Bajaj | 1 |
| #include <stdio.h>
#define sqr(x) (x*x)
int main()
{
int x=2;
printf("value of x=%d",sqr(x+1));
}
What is the value of x?
| Oracle | 13 |
| write a recursive program in'c'to find whether a given five
digit number is a palindrome or not | | 1 |
| 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 |
| How do I declare an array of N pointers to functions
returning pointers to functions returning pointers
to characters?
| | 1 |
| |
| For more C Interview Questions Click Here |