| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| 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 | 7 |
| write a program for even numbers? | | 8 |
| Can u return two values using return keyword? If yes, how?
If no, why? | | 7 |
| printf("%d",(printf("Hello")); What it returns?
| TCS | 23 |
| What does a run-time "null pointer assignment" error mean? | | 2 |
| I have a function which accepts a pointer to an int. How
can I pass a constant like 5 to it? | | 3 |
| What is Heap? | | 3 |
| how to display 2-D array elements in spiral | | 1 |
| which types of data structure will i use to convert infix to
post fix??? | IIT | 3 |
| plz answer....A program that takes 3 variables e.g a,b,c in
as seperate parameters and rotates the values stored so
that value goes a to b, b to c and c to a . | | 3 |
| #include<stdio.h>
main()
{
char *p1;
char *p2;
p1=(char *) malloc(25);
p2=(char *) malloc(25);
strcpy(p1,"Ramco");
strcpy(p2,"Systems");
strcat(p1,p2);
printf("%s",p1);
}
Tell me the output? | Ramco | 5 |
| program to find the second largest word in a paragraph
amongst all words that repeat more thn twice | iGate | 3 |
| what is the diff b/w static and non static variables in C.
Give some examples plz. | Wipro | 2 |
| proc() {
static i=10;
printf("%d",i);
}
If this proc() is called second time, what is the output?
| Hughes | 5 |
| what is meant by the "equivalence of pointers and arrays" in
C? | Satyam | 3 |
| Define function ?Explain about arguments? | Geometric-Software | 2 |
| 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 |
| 2)#include<iostream.h>
main()
{
printf("Hello World");
}
the program prints Hello World without changing main() the
o/p should
be
intialisation
Hello World
Desruct
the changes should be
a)iostream operator<<(iostream os, char*s)
os<<'intialisation'<<(Hello World)<<Destruct
b) c) d)none of the above | Siemens | 4 |
| what is difference b/w extern & volatile variable?? | Teleca | 2 |
| can we access one file to one directory? | | 1 |
| |
| For more C Interview Questions Click Here |