| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what is the diff between the printf and sprintf functions??
and what is the syntax for this two functions ?? | | 4 |
| What is the difference between char a[] = "string"; and
char *p = "string"; ? | Honeywell | 11 |
| 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 | 5 |
| what is the difference between declaration ,defenetion and
initialization of a variable? | LG-Soft | 5 |
| what is the differnce between AF_INET and PF_INET? | Wipro | 2 |
| what is self refrential structure | HCL | 2 |
| write a C program to print the program itself ?! | TCS | 12 |
| C,c++, Java is all are structural oriented or procedure
oriented language..? | | 3 |
| what is use#in c | | 3 |
| without using arithmatic operator convert an intger variable
x into x+1 | | 1 |
| which of the following statements is incorrect
a.typedef struct new{
int n1;
char n2;
} DATA;
b.typedef struct {
int n3;
char *n4;
}ICE;
c.typedef union {
int n5;
float n6;
} UDT;
d.#typedef union {
int n7;
float n8;
} TUDAT;
| TCS | 5 |
| Dear Sir,
we are required the bubble sorting programs
Regs
Prem | | 1 |
| pgm to find number of words starting with capital letters
in a file(additional memory usage not allowed)(if a word
starting with capital also next letter in word is capital
cann't be counted twice) | Subex | 1 |
| difference between function & structure | Verizon | 5 |
| Which of the Following is not defined in string.h?
A)strspn()
B)strerror()
C)memchr()
D)strod()
| Accenture | 1 |
| Write a program in c to input a 5 digit number and print it
in words. | | 1 |
| How to add two numbers with using function?
| | 3 |
| will the program compile? int i; scanf(%d,i); printf(%d,i); | | 2 |
| what is meant by c | | 4 |
| #define DCHAR char*
typedef char* TCHAR;
if using these following variables will be declared like
DCHAR ch1, ch2;
TCHAR ch3, ch4;
then what will be types of ch1, ch2, ch3 and ch4?
| NDS | 1 |
| |
| For more C Interview Questions Click Here |