| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| How to write a code for random pick from 1-1000 numbers?
The output should contain the 10 numbers from the range
1-1000 which should pick randomly, ie ,for each time we run
the code we should get different outputs. | NetApp | 12 |
| What are bit fields? What is their use? | Adobe | 1 |
| write an algorithm to get a sentence and reverse it in the
following format:
input : I am here
opuput: Here Am I
note: first letter of every word is capiatlised | | 2 |
| what is memory leak?
| | 3 |
| Program to write some contents into a file using file
operations with proper error messages. | | 1 |
| How would you find a cycle in a linked list?
| | 2 |
| can we print any string without using terminator? | Infosys | 2 |
| how can i make a program with this kind of output..
Enter a number: 5
0
01
012
0123
01234
012345
01234
0123
012
01
0 | Wipro | 3 |
| What's the difference between calloc() and malloc()? | | 3 |
| # define prod(a,b)=a*b
main()
{
int x=2;
int y=3;
printf("%d",prod(x+2,y-10)); }
the output of the program is
a.8
b.6
c.7
d.none
| TCS | 5 |
| True or false: If you continuously increment a variable, it
will become negative?
1) True
2) False
3) It depends on the variable type
| | 5 |
| Can u return two values using return keyword? If yes, how?
If no, why? | | 7 |
| difference between i++* and *++i | IBM | 3 |
| write a program for odd numbers? | | 6 |
| what is the defrenece between structure and union | | 5 |
| declare afunction pointer to int printf(char *)? | HCL | 1 |
| What is structure packing ? | HP | 1 |
| #include<stdio.h>
main()
{
char s1[]="Ramco";
char s2[]="Systems";
s1=s2;
printf("%s",s1);
}
Find the output | CitiGroup | 4 |
| How the C program can be compiled? | HP | 7 |
| array contains zeros and ones as elements.we need to bring
zeros one side and one other side in single parse.
ex:a[]={0,0,1,0,1,1,0,0}
o/p={0,0,0,0,0,1,1,1} | Motorola | 7 |
| |
| For more C Interview Questions Click Here |