| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| How do I initialize a pointer to a function? | | 2 |
| When you call malloc() to allocate memory for a local
pointer, do you have to explicitly free() it? | | 2 |
| Give me basis knowledge of c , c++... | | 4 |
| what is the advantage of using SEMAPHORES to ORDINARY
VARIABLES??? | NSN | 1 |
| Print all numbers which has a certain digit in a certain
position
eg:
number=45687
1 number=4
2 number=5
etc | | 2 |
| How to add two numbers with using function?
| | 3 |
| write program on arrays
| GE | 2 |
| Is reference used in C? | | 1 |
| What should not contain a header file? | | 2 |
| what is a far pointer | TCS | 9 |
| hello friends
what do u mean by BUS ERROR
i got this error while i am doing my program in DATA STRUCTURES | Wipro | 2 |
| Program to find the value of e raised to power x using while
loop | N-Tech | 3 |
| Write a program that accepts a string where multiple spaces
are given in between the words. Print the string ignoring
the multiple spaces.
Example:
Input: “ We.....Are....Student “ Note: one .=1 Space
Output: "We Are Student" | IBM | 4 |
| What is the difference between big endian form and little
endian form? write a code to convert big endian form to
little endian and vice versa.. | Aricent | 4 |
| disadvantages of realloc ? | HCL | 1 |
| const char *
char * const
What is the differnce between the above tow?.
| TCS | 5 |
| what will the following program do?
void main()
{
int i;
char a[]="String";
char *p="New Sring";
char *Temp;
Temp=a;
a=malloc(strlen(p) + 1);
strcpy(a,p);
//Line no:9//
p = malloc(strlen(Temp) + 1);
strcpy(p,Temp);
printf("(%s, %s)",a,p);
free(p);
free(a);
}
//Line no 15//
a) Swap contents of p & a and print:(New string, string)
b) Generate compilation error in line number 8
c) Generate compilation error in line number 5
d) Generate compilation error in line number 7
e) Generate compilation error in line number 1
| IBM | 1 |
| i=20,k=0;
for(j=1;j<i;j=1+4*(i/j))
{
k+=j<10?4:3;
}
printf("%d", k);
| HCL | 6 |
| what is the advantage of software development | | 1 |
| what is calloc and malloc? | | 1 |
| |
| For more C Interview Questions Click Here |