| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| What's wrong with "char *p; *p = malloc(10);"? | | 5 |
| 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 |
| suppose we use switch statement and we intilize years name
using enum statement like(jan,feb,mar,------dec) we take
integer value as an input .question is that the month which
we analyz is from 0 to 11 bt if i enter 12 than how he
again starts from begning and print jan | | 1 |
| how to display 2-D array elements in spiral | | 1 |
| how to connect oracle in C/C++. | | 2 |
| how to return 1000 variables from functio9n in c?plz give me
code also | | 5 |
| Average of a couple 10 years ago was 25. The average
remains same after having a child and twins after 3 years.
What is the present age of the first child | IBM | 9 |
| What is memmove? | Oracle | 1 |
| How to add two numbers without using arithmetic operators? | Sapient | 11 |
| fn f(x)
{ if(x<=0)
return;
else f(x-1)+x;
}
| HCL | 3 |
| print the following using nested for loop.
5 4 3 2 1
1 2 3 4
3 2 1
1 2
1
2 1
1 2 3
4 3 2 1
1 2 3 4 5 | | 5 |
| printf("%d",(printf("Hello")); What it returns?
| TCS | 23 |
| if ENTERED FIVE DIGITS DESIGN A PROGRAM THAT WILL FIND
CORRESPONDING VALUE FROM ASCII TABLE | | 1 |
| YBJBU6 | | 1 |
| n=7623
{
temp=n/10;
result=temp*10+ result;
n=n/10
}
| Wipro | 4 |
| main()
{
printf("hello%d",print("QUARK test?"));
}
| | 4 |
| 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 |
| 2. Counting in Lojban, an artificial language developed
over the last fourty years, is easier than in most languages
The numbers from zero to nine are:
0 no
1 pa
2 re
3 ci
4 vo
5 mk
6 xa
7 ze
8 bi
9 so
Larger numbers are created by gluing the digit togather.
For Examle 123 is pareci
Write a program that reads in a lojban string(representing
a no less than or equal to 1,000,000) and output it in
numbers.
| Nagarro | 2 |
| Would you rather wait for the results of a quicksort, a
linear search, or a bubble sort on a 200000 element array?
1) Quicksort
2) Linear Search
3) Bubble Sort
| | 2 |
| We can draw a box in cprogram by using only one printf();&
without using graphic.h header file? | NIIT | 3 |
| |
| For more C Interview Questions Click Here |