| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Which of the following is not a valid declaration for main
()?
1) int main()
2) int main(int argc, char *argv[])
3) They both work
| | 2 |
| 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 |
| how to print "hai" in c? | | 10 |
| how to print value of e(exp1)up to required no of digits
after decimal? | | 1 |
| Write a program that takes three variables(a,b,c) in as
separate parameters and rotates the values stored so that
value a goes to b,b,to c and c to a | | 3 |
| how to find out the union of two character arrays? | | 1 |
| What is the memory allocated by the following definition ?
int (*x)(); | ADITI | 2 |
| a 'c' program to tell that the set of three coordinates lie
on a same line | Persistent | 1 |
| c programming of binary addition of two binary numbers
| | 1 |
| Which of the Following is not defined in string.h?
A)strspn()
B)strerror()
C)memchr()
D)strod()
| Accenture | 1 |
| which type of question asked from c / c++ in interview. | | 2 |
| Write a program to remove the C comments(/* */) and C++
comments(//) from a file.
The file should be declared in command line. | Subex | 2 |
| actually i have 2 years teaching experience as computer
faculty but now i am a DBA but when i go for interview many
peoples asked me why i left my teaching profession and why
i want to come in this field kindly give me the proper
answer of this queston
| | 1 |
| What is C language Terminator? | TCS | 12 |
| write the program for prime numbers? | TCS | 10 |
| 44.what is the difference between strcpy() and memcpy()
function?
45.what is output of the following statetment?
46.Printf(“%x”, -1<<4); ?
47.will the program compile?
int i;
scanf(“%d”,i);
printf(“%d”,i);
48.write a string copy function routine?
49.swap two integer variables without using a third
temporary variable?
50.how do you redirect stdout value from a program to a file?
51.write a program that finds the factorial of a number
using recursion? | | 3 |
| in C-programming language without using printf statement
can we get output r not ? if yes how and if no also how ?
| | 6 |
| HOW TO SWAP TWO NOS IN ONE STEP? | Satyam | 12 |
| How to swap two values using a single variable ?
condition: Not to use Array and Pointer ? | | 4 |
| 4.A function 'q' that accepts a pointer to a character as
argument and returns a pointer to an array of integer can
be declared as:
A)int (*q(char*)) []
B)int *q(char*) []
C)int(*q)(char*) []
D)None of the Above
| Accenture | 4 |
| |
| For more C Interview Questions Click Here |