| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| main()
{
printf("hello%d",print("QUARK test?"));
}
| | 4 |
| Reverse the part of the number which is present from
position i to j. Print the new number.
eg:
num=789876
i=2
j=5
778986 | | 1 |
| Read N characters in to an array . Use functions to do all
problems and pass the address of array to function.
1. Print only the alphabets . If in upper case print in
lower case vice versa. | | 1 |
| difference between memcpy and strcpy | | 1 |
| what does the following function print?
func(int i)
{
if(i%2)return 0;
eale return 1;
}
main()
{
int =3;
i=func(i);
i=func(i);
printf("%d",i);}
| TCS | 8 |
| 1. Write a c pgm to print 1 to 100 without using loops.
2. Write a c pgm for leap year
3. Write a c pgm fibbonacci series,factorial
4. Write a c pgm count no of lines , blanks, tabs in a
para(File concept)
5. Write a c pgm to print the letter as per given condition
i.e.. if u give 4
out put should b
4 4 4 4
4 4 4 4
4 4 4 4
4 4 4 4
6.how do get the o/p in number from 1 to 100 in the screen
without using control statement?
7. who do u print the word "hello world" without using
"printf" statement?
8. write sql program to get the detail of student in a
class?
Definitions:
structure
union
arrays
linkedlist
macros
directives
difference b/w
pre processorsDiffrence:
1.Constructors and destructors
2.Structure and Union
3.Array and Lists
4.pre processor...
5. Privillages in C++
6.structure and union
7.break and continue
8.while and dowhile Pgm.. | | 1 |
| write a program to generate 1st n fibonacci prime number | | 5 |
| char ch=10;printf("%d",ch);what is the output | Accenture | 11 |
| HOW TO HANDLE EXCEPTIONS IN C | | 5 |
| void main()
{
int s[4][2]={ {1234,56},{1212,33},{1434,80},{1312,78} };
int (*p)[2];
int i,j,*pint;
for(i=0;i<=3;i++)
{
p=&s[i];
pint=p;
printf("\n");
for(j=0;j<=1;j++)
printf("%d",*(pint+j));
}
} while running this program it shows a warning-suspicious
pointer conversion ie pint=p; my que is why should we assign
the value of p to pint again.why cant we use it directly as
*(p+j)..but if i use like tat the o/p is garbage value.. | | 1 |
| what is the difference between arrays and linked list | Tech-Mahindra | 15 |
| where does malloc() function get the memory? | | 1 |
| Blade logic interview question.
1st round is a written tests with 15 multiple questions
from c and c++. All are simple basic question.
Like int main ()
{
Int i=65;
Return printf(“%c”, i);
}
2nd and 3rd round is technical interview.
The position for which I was interview was core UNIX and c.
Yes it is for system programming.
The company has product name blade server. For their server
they are creating their own command for their purpose.
Example cd command.
We can implement it in a c program by using the chdir()
function.
So the question asks related to PID, fork, pipe, shared
memory, signal.
Write a program in c which will act as cp command.
| BladeLogic | 1 |
| I have a function which accepts a pointer to an int. How
can I pass a constant like 5 to it? | | 3 |
| Write a routine that prints out a 2-D array in spiral order! | Lucent | 1 |
| Write the program for displaying the ten most frequent words
in a file such that your program should be efficient in all
complexity measures. | Google | 3 |
| Is it possible to create recycle bin in mobiles? | | 2 |
| the format specified for hexa decimal is
a.%d
b.%o
c.%x
d.%u
| TCS | 4 |
| write a “Hello World” program in “c” without using a semicolon? | | 3 |
| How can we open a file in Binary mode and Text mode?what is
the difference? | PanTerra | 1 |
| |
| For more C Interview Questions Click Here |