| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Write one statement equalent to the following two statements
x=sqr(a);
return(x);
Choose from one of the alternatives
a.return(sqr(a));
b.printf("sqr(a)");
c.return(a*a*a);
d.printf("%d",sqr(a));
| TCS | 4 |
| write a program to generate 1st n fibonacci prime number | | 1 |
| write a program to swap bits in a character and return the value
prototype of function
char fun (char a, charb flag c)
where fun returns a char, char a is a the value char b is
the bit to be changed and flag c is the bit value
for eg: x=fun(45,7,0)
since 45 is 0010 0101
and ow x should contain the value 65 (0110 0101) | Bosch | 1 |
| 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 |
| wats SIZE_T meant for? | | 1 |
| 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 |
| How many types of linked lists what are they?
How many types of data structures? | BSNL | 5 |
| which of the following go out of the loopo if expn 2
becoming false
a.while(expn 1){...if(expn 2)continue;}
b.while(!expn 1){if(expn 2)continue;...}
c.do{..if(expn 1)continue;..}while(expn 2);
d.while(!expn 2){if(expn 1)continue;..}
| TCS | 2 |
| How to set a variable in the environment list? | | 1 |
| WAP TO ACCEPT STRING AND COUNT A COMES N TIMES B COMES N
TIMES C COMES N TIMES D COMES N TIMES AND SO ON.........
AT LAST UNTIL Z COMES N TIMES...............
| | 3 |
| pgm to find middle element of linklist(in efficent manner) | Huawei | 2 |
| what is diff b/w huge & far & near pointer?? | HCL | 1 |
| How would you sort a linked list? | | 1 |
| why should i select you? | Wipro | 18 |
| Difference between null pointer and dangling pointer? | Wipro | 3 |
| 1. Write the function int countchtr(char string[ ], int ch);
which returns the number of times the character ch appears
in the string.
Example, the call countchtr(“She lives in NEWYORK”, ‘e’)
would return 3.
| | 2 |
| what is the code for getting the output as
*
**
*** | Caritor | 5 |
| write a program to display the array elements in reverse
order in c language | | 6 |
| x=2,y=6,z=6
x=y==z;
printf(%d",x)
| HCL | 8 |
| what is the difference between structural,object
based,object orientd programming languages? | PanTerra | 1 |
| |
| For more C Interview Questions Click Here |