| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| 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 | 3 |
| How would you print out the data in a binary tree, level by
level, starting at the top? | | 3 |
| Write an implementation of float stringToFloat(char *str).
The code should be simple, and not require more than the
basic operators (if, for, math operators, etc.).
Assumptions
Dont worry about overflow or underflow
Stop at the 1st invalid character and return the number
you have converted till then, if the 1st character is
invalid return 0
Dont worry about exponential (e.g. 1e10), instead you
should treat e as an invalid character
Write it like real code, e.g. do error checking
Go though the string only once
Examples
1.23 should return 1.23
1a should return 1
ashould return 0
| Qualcomm | 2 |
| Write the program for displaying the ten most frequent words
in a file such that your program should be efficient in all
complexity measures. | Google | 3 |
| compute the nth mumber in the fibonacci sequence? | TCS | 6 |
| What do you mean by team?? | | 2 |
| What is external and internal variables
What is dynamic memory allocation
what is storage classes in C | | 2 |
| Write a program to accept a character & display its
corrosponding ASCII value & vice versa? | | 3 |
| How can I return multiple values from a function? | | 3 |
| how does the C compiler interpret the following two statements
p=p+x;
q=q+y;
a.p=p+x;
q=q+y
b.p=p+xq=q+y
c.p=p+xq;
q=q+y
d.p=p+x/q=q+y
| TCS | 2 |
| how many header file is in C language ? | | 3 |
| What are the uses of pre-processor directives? | | 2 |
| why i join syntel? | Syntel | 11 |
| what is the use of getch() function in C program..
difference b/w getch() and getche()?? | Wipro | 10 |
| what is the difference between normal variables and pointer
variables.............. | Satyam | 4 |
| what is the difference between <stdio.h> and "stdio.h" | Kanbay | 5 |
| how many argument we can pas in in a function | CTS | 18 |
| Given an array of length N containing integers between 1
and N, determine if it contains any duplicates. | | 2 |
| how to do in place reversal of a linked list(singly or
doubly)? | | 1 |
| what is the difference between NULL & NUL keywords in C? | | 3 |
| |
| For more C Interview Questions Click Here |