| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| program to get the remainder and quotant of given two
numbers with out using % and / operators? | IBM | 8 |
| what is the definition of storage classes? | Wipro | 2 |
| main()
{
clrscr();
}
clrscr();
| ME | 3 |
| how to add numbers without using arithmetic operators. | TCS | 10 |
| without using arithmatic operator convert an intger variable
x into x+1 | | 1 |
| how to find out the biggest element (or any other
operation) in an array which is dynamic. User need not to
mention the array size while executing. | | 2 |
| what is c?
| Tech-Mahindra | 5 |
| write a C program to print the program itself ?! | TCS | 12 |
| 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 |
| to find out the reverse digit of a given number | Infosys | 5 |
| 6. Which of the Following is not defined in string.h?
A)strspn()
B)strerror()
C)memchr()
D)strod()
| Accenture | 1 |
| In scanf h is used for | BFL | 2 |
| How can I prevent other programmers from violating
encapsulation by seeing the private parts of my class? | | 1 |
| which of the following go out of the loopo if expn 2
becoming false
a.while(expn 1){...if(expn 2)continue;}
b.while(!expn 1){if(expn 2)continue;...}
c.do{..if(expn 1)continue;..}while(expn 2);
d.while(!expn 2){if(expn 1)continue;..}
| TCS | 2 |
| int *p=20;
if u print like dis printf("%d",p);
o\p:- 20; how is it possible?
plz give me the explanation. | Global-Edge | 11 |
| How to find the given no is odd or even without checking of
any condition and loops. (Hint: Using array) | | 4 |
| class foo {
public:
static int func(const char*& p) const;
};
This is illegal, why? | Google | 6 |
| 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 |
| to find the program of matrix multiplication using arrays | | 2 |
| how we can make 3d venturing graphics on outer interface | Microsoft | 1 |
| |
| For more C Interview Questions Click Here |