| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| When you call malloc() to allocate memory for a local
pointer, do you have to explicitly free() it? | | 2 |
| What is difference between the following 2 lines….
int temp = (int)(0x00);
int temp = (0x00int);
| Bosch | 3 |
| why r u join this company? give solid resons. | Infosys | 7 |
| #include<stdio.h>
int fun();
int i;
int main()
{
while(i)
{
fun();
main();
}
printf("hello \n");
return 0;
}
int fun()
{
printf("hi");
}
answer is hello.how??wat is tat while(i) mean? | Intel | 4 |
| int i =10
main()
{
int i =20,n;
for(n=0;n<=i;)
{
int i=10
i++;
}
printf("%d", i);
| HCL | 5 |
| How can I make a program in c to print 'Hello' without
using semicolon in the code? | C-DAC | 5 |
| why i join syntel? | Syntel | 12 |
| Whats wrong with the following function
char *string()
{
char *text[20];
strcpy(text,"Hello world");
return text;
} | Qualcomm | 3 |
| 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 | 2 |
| plz answer....A program that takes 3 variables e.g a,b,c in
as seperate parameters and rotates the values stored so
that value goes a to b, b to c and c to a . | | 3 |
| f(char *p)
{
p=(char *)malloc(sizeof(6));
strcpy(p,"HELLO");
}
main()
{
char *p="BYE";
f(p)
printf("%s",p);
}
what is the output?
| Hughes | 6 |
| what is use of loop? | Infosys | 6 |
| write a code for large nos multilication (upto 200 digits) | Persistent | 1 |
| Explain in detail how strset (string handling function
works )pls explain it with an example. | | 1 |
| which types of data structure will i use to convert infix to
post fix??? | IIT | 3 |
| main()
{
int a=0;
if(a=0) printf("Ramco Systems\n");
printf("India\n");
}
output? | Ramco | 6 |
| write a addition of two no. program with out using
printf,scanf,puts . | | 3 |
| How can I access memory located at a certain address? | | 2 |
| write a program to check whether a given integer is a strong
number or not?
[Hint:
145=1!+4!+5!
=1+24+120
=145]
| | 4 |
| what is the diff b/w static and non static variables in C.
Give some examples plz. | Wipro | 2 |
| |
| For more C Interview Questions Click Here |