| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Write a program to print this triangle:
*
**
*
****
*
******
*
********
*
**********
Don't use printf statements;use two nested loops instead.
you will have to use braces around the body of the outer
loop if it contains multiple statements. | | 1 |
| How to implement variable argument functions ? | HP | 1 |
| how memory store byte
| Huawei | 3 |
| f=(x>y)?x:y
a) f points to max of x and y
b) f points to min of x and y
c)error
| HCL | 3 |
| main()
{
printf("hello%d",print("QUARK test?"));
}
| | 3 |
| write a program to arrange the contents of a 1D array in
ascending order | | 2 |
| How can I access memory located at a certain address? | | 2 |
| what is the stackpointer | | 2 |
| what is the return value (status code) of exit() function....
what the arguments(integer value) passed to it means.... | TCS | 1 |
| what is the differnce between AF_INET and PF_INET? | Wipro | 1 |
| How many ways are there to swap two numbers without using
temporary variable? Give the each logic. | | 4 |
| what is real time system?what is the differance between hard
and soft real time systems | | 1 |
| write an interactive program to generate the divisors of a
given integer. | TCS | 2 |
| what is the difference b/w compiler and debugger? | | 1 |
| How do you write a program which produces its own source
code as its output? | | 2 |
| if a five digit number is input through the keyboard, write
a program to calculate the sum of its digits.
(hint:-use the modulus operator.'%') | | 5 |
| 11. Look at the Code:
#include<string.h>
void main()
{
char s1[]="abcd";
char s2[10];
char s3[]="efgh";
int i;
clrscr();
i=strcmp(strcat(s3,ctrcpy(s2,s1))strcat(s3,"abcd"));
printf("%d",i);
}
What will be the output?
A)No output B) A Non Integer C)0 D) Garbage
| Accenture | 5 |
| write a program to generate 1st n fibonacci prime number | | 1 |
| proc() {
static i=10;
printf("%d",i);
}
If this proc() is called second time, what is the output?
| Hughes | 5 |
| Write a program to accept a character & display its
corrosponding ASCII value & vice versa? | | 3 |
| |
| For more C Interview Questions Click Here |