| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| How do I declare an array of N pointers to functions
returning pointers to functions returning pointers
to characters?
| | 1 |
| 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 | 1 |
| find the output of the following program
main()
{
int x=5, *p;
p=&x;
printf("%d",++*p);
}
| TCS | 4 |
| 4.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 | 4 |
| program to find the ASCII value of a number | | 5 |
| What is structure packing ? | HP | 1 |
| Struct(s)
{
int a;
long b;
}
Union (u)
{int a;
long b;
}
Print sizeof(s)and sizeof(u) if sizeof(int)=4 and
sizeof(long)=4
| Mascot | 2 |
| Concat two string with most overlapped substring has to
remove "abcd"+ "cdef" = "abcdef | | 5 |
| what is the differance between pass by reference and pass
by value. | Infosys | 4 |
| how to find the size of the data type like int,float
without using the sizeof operator? | | 5 |
| Convert the following expression to postfix and prefix
(A+B) * (D-C) | | 1 |
| x=2,y=6,z=6
x=y==z;
printf(%d",x)
| HCL | 7 |
| write a fuction for accepting and replacing lowercase
letter to'Z' with out using inline function. | Temenos | 3 |
| what is use#in c | | 2 |
| main()
{
char *p1="Name";
char *p2;
p2=(char *)malloc(20);
while(*p2++=*p1++);
printf("%s\n",p2);
}
what is the output?
| Ramco | 3 |
| Given an array of characters which form a sentence of
words, give an efficient algorithm to reverse the order of
the words (not characters) in it? | | 2 |
| 1.write a program to merge the arrays
2.write efficient code for extracting unique elements from a
sorted list of array? | Qualcomm | 1 |
| int a=2,b=3,c=4;
printf("a=%d,b=%d\n",a,b,c);
what is the o/p? | Verifone | 4 |
| What's wrong with "char *p = malloc(10);" ? | | 4 |
| How the processor registers can be used in C ? | HP | 4 |
| |
| For more C Interview Questions Click Here |