| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Name the language in which the compiler of "c" in written? | Bajaj | 1 |
| 2)#include<iostream.h>
main()
{
printf("Hello World");
}
the program prints Hello World without changing main() the
o/p should
be
intialisation
Hello World
Desruct
the changes should be
a)iostream operator<<(iostream os, char*s)
os<<'intialisation'<<(Hello World)<<Destruct
b) c) d)none of the above | Siemens | 4 |
| how to connect oracle in C/C++. | | 2 |
| What's wrong with the call "fopen ("c:\newdir\file.dat", "r")"? | | 1 |
| write a programe returns the number of times the character
appears in the string | | 1 |
| WRITE A PROGRAM IN C TO MULTIPLY TWO 2-D ARRAYS | | 4 |
| Unsigned char c;
for ( c=0;c!=256;c++2)
printf("%d",c);
No. of times the loop is executed ?
| Mascot | 3 |
| 24.what is a void pointer?
25.why arithmetic operation can’t be performed on a void
pointer?
26.differentiate between const char *a; char *const a;
and char const *a;
27.compare array with pointer?
28.what is a NULL pointer?
29.what does ‘segmentation violation’ mean?
30.what does ‘Bus Error’ mean?
31.Define function pointers?
32.How do you initialize function pointers? Give an example?
33.where can function pointers be used? | | 1 |
| what is meant by the "equivalence of pointers and arrays" in
C? | Satyam | 3 |
| What is alloca() and why is its use discouraged? | | 1 |
| Which of the following sorts is quickest when sorting the
following set: 1 2 3 5 4
1) Quick Sort
2) Bubble Sort
3) Merge Sort
| | 5 |
| #include<stdio.h>
main()
{
char s1[]="Ramco";
char s2[]="Systems";
s1=s2;
printf("%s",s1);
}
what will happen if you executed this code? | Ramco | 4 |
| Predict the output or error(s) for the following:
25. main()
{
printf("%p",main);
}
| ME | 3 |
| Hi,
main()
{
}
Is a user defined function or Built in Functionn | Honeywell | 9 |
| Find string palindrome 10marks
| Honeywell | 5 |
| Look at the Code:
main()
{
int a[]={1,2,3},i;
for(i=0;i<3;i++)
{
printf("%d",*a);
a++;
}
}
Which Statement is/are True w.r.t the above code?
I.Executes Successfully & Prints the contents of the array
II.Gives the Error:Lvalue Required
III.The address of the array should not be changed
IV.None of the Above.
A)Only I B)Only II C)II & III D)IV
| Accenture | 3 |
| HOW TO SWAP TWO NOS IN ONE STEP? | Satyam | 12 |
| write a function to find whether a string is palindrome or
not and how many palindrome this string contain? | | 1 |
| how many header file is in C language ? | | 14 |
| Please list all the unary and binary operators in C. | | 1 |
| |
| For more C Interview Questions Click Here |