| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| How can I get Single byte from 'int' type variable? Can we
alter single bit or multiple bits in int type variable? if so,
How? | | 2 |
| how to find out the inorder successor of a node in a tree?? | TCS | 2 |
| write program on arrays
| GE | 2 |
| program for comparing 2 strings without strcmp() | | 3 |
| what is calloc and malloc? | | 1 |
| How can I call a function, given its name as a string? | ABC-Telecom | 2 |
| Suppose I want to write a function that takes a generic
pointer as an argument and I want to simulate passing it by
reference. Can I give the formal parameter type void **, and
do something like this?
void f(void **);
double *dp;
f((void **)&dp);
| | 1 |
| what will happen if you free a pointer twice after
allocating memory dynamically ? | Novell | 2 |
| write a own function for strstr | LG-Soft | 1 |
| When is an interface "good"?
| | 1 |
| I use turbo C which allocates 2 bytes for integers and 4
bytes for long. I tried to declare array of size 500000 of
long type using the following code...
long *arr;
arr=(long *)(malloc)(500000 * sizeof(long));
It gives a warning that "Conversion may lose significant
digits in function main"...
And the resulting array size was very less around 8400 as
compared to 500000. Any suggestions will be welcomed....
| | 2 |
| what is the different between if-else and switch statment
(other than syntax) | CTS | 9 |
| plssssss help !!....using array.. turbo c..
create a program that will accept number of words to be
consored.
.a word must not exceed 10 characters long
.the text to be entered will be no longer than 200 characters
.there will be no 10 words
example:
enter number of words to be censor: 5
enter words to censor:
windows
office
microsoft
bill
gates
enter text to censor:
bill gates founded microsoft and makes office and windows
sample output:
<consored> <censored> founded <censored> and makes
<censored> and <censored> | | 1 |
| how to print value of e(exp1)up to required no of digits
after decimal? | | 1 |
| what is y value of the code if input x=10
y=5;
if (x==10)
else if(x==9)
elae y=8;
a.9
b.8
c.6
d.7
| TCS | 2 |
| how to implement stack work as a queue? | | 2 |
| what is the output for the code :
main()
{
int i,j;
printf("%d %d ",scanf("%d%d",&i,&j));
} | Infosys | 15 |
| pgm to find middle element of linklist(in efficent manner) | Huawei | 2 |
| 10. Study the code:
void show()
main()
{
show();
}
void show (char *s)
{
printf("%sn",s);
}
What will happen if it is compiled & run on an ANSI C
Compiler?
A)It will compile & nothing will be printed when it is
executed
B)it will compile but not link
C)the compiler will generate an error
D)the compiler will generate a warning
| Accenture | 4 |
| How to find the given no is odd or even without checking of
any condition and loops. (Hint: Using array) | | 4 |
| |
| For more C Interview Questions Click Here |