| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what is dangling pointer? | LG-Soft | 1 |
| Write a program to find the smallest and largest element in
a given array in c language | | 1 |
| What compilation do? | Geometric-Software | 5 |
| How can I find out how much memory is available? | Persistent | 1 |
| how to find out the inorder successor of a node in a tree?? | TCS | 2 |
| What is false about the following
A compound statement is
a.A set of simple statments
b.Demarcated on either side by curly brackets
c.Can be used in place of simple statement
d.A C function is not a compound statement.
| TCS | 1 |
| 1.find the second maximum in an array?
2.how do you create hash table in c?
3.what is hash collision | Qualcomm | 4 |
| explain memory layout of a C program | | 1 |
| When you call malloc() to allocate memory for a local
pointer, do you have to explicitly free() it? | | 2 |
| Write a program to compare two strings without using the
strcmp() function | Accenture | 6 |
| write a program to display the array elements in reverse
order in c language | | 2 |
| what is out put of the following code?
#include
class Base
{
Base()
{
cout<<"constructor base";
}
~Base()
{
cout<<"destructor base";
}
}
class Derived:public Base
{
Derived()
{
cout<<"constructor derived";
}
~Derived()
{
cout<<"destructor derived";
}
}
void main()
{
Base *var=new Derived();
delete var;
}
| Honeywell | 2 |
| Who had beaten up hooligan "CHAKULI" in his early college days? | | 1 |
| which of the following go out of the loopo if expn 2
becoming false
a.while(expn 1){...if(expn 2)continue;}
b.while(!expn 1){if(expn 2)continue;...}
c.do{..if(expn 1)continue;..}while(expn 2);
d.while(!expn 2){if(expn 1)continue;..}
| TCS | 2 |
| why r u join this company? give solid resons. | Infosys | 3 |
| What will be the result of the following program?
main()
{
char p[]="String";
int x=0;
if(p=="String")
{
printf("Pass 1");
if(p[sizeof(p)-2]=='g')
printf("Pass 2");
else
printf("Fail 2");
}
else
{
printf("Fail 1");
if(p[sizeof(p)-2]=='g')
printf("Pass 2");
else
printf("Fail 2");
}
}
a) Pass 1, Pass 2
b) Fail 1, Fail 2
c) Pass 1, Fail 2
d) Fail 1, Pass 2
e) syntax error during compilation
| IBM | 9 |
| 1,1,5,17,61,217,?,?. | | 3 |
| Function to find the given number is a power of 2 or not? | Motorola | 9 |
| what is the differance between pass by reference and pass
by value. | Infosys | 4 |
| Switch (i)
i=1;
case 1
i++;
case 2
++i;
break;
case 3
--i;
Output of i after executing the program
| Mascot | 4 |
| |
| For more C Interview Questions Click Here |