| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| what is call by value and call by reference | | 2 |
| Explain what?s happening in the first constructor: public
class c{ public c(string a) : this() {;}; public c() {;} }
How is this construct useful?
| | 1 |
| 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 | 7 |
| Hi,
main()
{
}
Is a user defined function or Built in Functionn | Honeywell | 9 |
| Name the language in which the compiler of "c" in written? | Bajaj | 1 |
| Why the use of alloca() is discouraged?
| Oracle | 2 |
| How can I set an array's size at run time? | | 7 |
| int a=2,b=3,c=4;
printf("a=%d,b=%d\n",a,b,c);
what is the o/p? | Verifone | 6 |
| Explain in detail how strset (string handling function
works )pls explain it with an example. | | 1 |
| WAP to accept rollno,course name & marks of a student &
display grade if total marks is above 200? | | 2 |
| Find string palindrome 10marks
| Honeywell | 5 |
| can anyone proide me reading material on
svit00ef27@yahoo.com please thanx in advance
| IBM | 1 |
| You are given a string which contains some special
characters. You also have set of special characters. You are
given other string (call it as pattern string). Your job is
to write a program to replace each special characters in
given string by pattern string. You are not allowed to
create new resulting string. You need to allocate some new
memory to given existing string but constraint is you can
only allocate memory one time. Allocate memory exactly what
you need not more not less. | Microsoft | 2 |
| void main(int argc,char *argv[],char *env[])
{
int i;
for(i=1;i<argc;i++)
printf("%s",env[i]);
} | | 2 |
| what is the difference between arrays and linked list | Tech-Mahindra | 15 |
| number 2 plssssss help !!....using array.. turbo c..
create a program that will accept a number and determine if
it is a happy number or an unhappy number..
example:
enter a number : 7
7*7=49
then 4 and 9
4*4 and 9*9== 16 + 18 gives you 97
then 9 and 7
9*9 and 7*7 == 81 + 49 gives you 130
then 1 and 3
1*1 and 3*3 == 1 + 9 gives you 10
1*1 gives you 1
sample output:
7= 49= 16+81= 97= 81+49=130 =1+9=10 =1
"7 is a happy number"
. if the last number is 2 then the number being inputed is
not a happy number.
| | 2 |
| what is array? | HCL | 22 |
| 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 |
| why division operator not work in case of float constant? | | 1 |
| proc() {
static i=10;
printf("%d",i);
}
If this proc() is called second time, what is the output?
| Hughes | 5 |
| |
| For more C Interview Questions Click Here |