| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Study the code:
void show()
main()
{
show();
}
void show (char *s)
{
printf("%sn",s);
}
What will happen if it is compiled & run on an ANSI C
Compiler?
A)It will compile & nothing will be printed when it is
executed
B)it will compile but not link
C)the compiler will generate an error
D)the compiler will generate a warning
| Accenture | 3 |
| Determine the code below, tell me exactly how many times is
the operation sum++ performed ?
for ( i = 0; i < 100; i++ )
for ( j = 100; j > 100 - i; j--)
sum++; | ITCO | 3 |
| what is use#in c | | 2 |
| program to find the second largest word in a paragraph
amongst all words that repeat more thn twice | iGate | 2 |
| What is the most efficient way to count the number of bits
which are set in a value? | | 2 |
| how to find the kth smallest element in the given list of
array elemnts.
| Silicon | 3 |
| what does exit() do? | Cadence | 3 |
| How do I declare a pointer to an array? | | 4 |
| WHAT IS MAXIMUM SIZE OF AN ARRAY IN C LANGUAGE? | IBM | 3 |
| Sir i want e-notes of C languge of BAlaguruswami book i.e
scanned or pdf file of balaguruswamy book on c
language.PLEASE SEND ME on my mail id ajit_kolhe@rediff.com
| | 2 |
| hat is a pointer? | Assurgent | 3 |
| 9.how do you write a function that takes a variable number
of arguments? What is the prototype of printf () function?
10.How do you access command-line arguments?
11.what does ‘#include<stdio.h>’ mean?
12.what is the difference between #include<> and #include”…”?
13.what are # pragma staments?
14.what is the most appropriate way to write a
multi-statement macro? | L&T | 4 |
| Give the output for the following program.
#define STYLE1 char
main()
{
typedef char STYLE2;
STYLE1 x;
STYLE2 y;
clrscr();
x=255;
y=255;
printf("%d %d\n",x,y);
}
| ADITI | 1 |
| 12. Look at the Code:
main()
{
int a[]={1,2,3},i;
for(i=0;i<3;i++)
{
printf("%d",*a);
a++;
}
}
Which Statement is/are True w.r.t the above code?
I.Executes Successfully & Prints the contents of the array
II.Gives the Error:Lvalue Required
III.The address of the array should not be changed
IV.None of the Above.
A)Only I B)Only II C)II & III D)IV
| Accenture | 4 |
| what is the difference between getch() and getchar()? | | 2 |
| How to use c/c++ code in JAVA | Satyam | 4 |
| Concat two string with most overlapped substring has to
remove "abcd"+ "cdef" = "abcdef | | 4 |
| fn f(x)
{ if(x<=0)
return;
else f(x-1)+x;
}
| HCL | 2 |
| void swap(int a,int b)
{
a=a+b;
b=a-b;
a=a-b;
}
in this code always gives the same result for all case | TCS | 5 |
| Is the C language is the portable language...If yes...Then
Why...and if not then what is problem so it is not a
Portable language..??? | TCS | 1 |
| |
| For more C Interview Questions Click Here |