| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Can I pass constant values to functions which accept structure
arguments? | | 2 |
| Reverse the part of the number which is present from
position i to j. Print the new number.[without using the array]
eg:
num=789876
i=2
j=5
778986 | | 2 |
| How to calculate Total working time using Login and
logout? | Wipro | 2 |
| A function 'q' that accepts a pointer to a character as
argument and returns a pointer to an array of integer can
be declared as:
A)int (*q(char*)) []
B)int *q(char*) []
C)int(*q)(char*) []
D)None of the Above
| Accenture | 2 |
| 2.Given the short c program that follows
a. make a list of the memory variables in this program
b.which lines of code contain operations that change the
contents of memory? what are those operations?
Void main( void)
{
Double base;
Double height;
Double area;
Printf(“enter base and height of triangle :”);
Scanf(“%lg”, &base);
Scanf(“%lg”, &height);
Area=base*height/2.0;
Printf(“the area of the triangle is %g \n”,area);
}
| Wipro | 1 |
| What is the Difference between Class and Struct? | Motorola | 9 |
| Will Macros support multiple arguments ?
| Oracle | 7 |
| What is the output of following program ?
int
main()
{
int x = 5;
printf("%d %d %d\n", x, x << 2, x >> 2);
} | Qualcomm | 3 |
| can we access one file to one directory? | | 1 |
| what is the code for getting the output as
*
**
*** | Caritor | 5 |
| what does the following code do?
fn(int n,int p,int r)
{
static int a=p;
switch(n){
case 4:a+=a*r;
case 3:a+=a*r;
case 2:a+=a*r;
case 1:a+=a*r;
}
}
a.computes simple interest for one year
b.computes amount on compound interest for 1 to 4 years
c.computes simple interest for four year
d.computes compound interst for 1 year
| TCS | 4 |
| here is a link to download Let_Us_C_-_Yashwant_Kanetkar | | 2 |
| N O S I E R
+ A S T R A L
----------------
7 2 5 6 1 3 | Honeywell | 2 |
| what is c?
| Tech-Mahindra | 5 |
| if array a conatins 'n' elements and array b conatins 'n-1'
elements.array b has all element which are present in array
a but one element is missing in array b. find that
element. | Zycus-Infotech | 9 |
| how the size of an integer is decided?
- is it based on processor or compiler or OS? | nvidia | 16 |
| Find Error if any in below code, Justify ur answer:
struct xx
{
int a;
struct yy
{
char c;
struct xx* p;
}
struct yy* q;
} | NDS | 3 |
| Difference between Class and Struct.
| Motorola | 6 |
| Program to display given 3 integers in ascending order | N-Tech | 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 | 4 |
| |
| For more C Interview Questions Click Here |