| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| 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 diff between localstatic and globalstatis variable
possible 2 use in another file...? | HCL | 2 |
| To find whether a number is even or odd without using any
conditional operator?? | IBM | 4 |
| To what value are pointers initialized?
1) NULL
2) Newly allocated memory
3) No action is taken by the compiler to initialize
pointers.
| | 2 |
| Tell us the difference between these two :
#include"stdio.h"
#include<stdio.h>
define in detial. | | 4 |
| How to receive strings with spaces in scanf() | | 4 |
| write a string copy function routine? | | 1 |
| what is self refrential structure | HCL | 2 |
| Why doesn't the code "int a = 1000, b = 1000;
long int c = a * b;" work? | | 6 |
| write a program that explain #define and # undef directive | | 1 |
| parkside's triangle..
create a program like this..
enter the size: 6
enter the seed: 1
output:
1
23
456
7891
23456
789123
sample2:
enter the size: 5
enter the seed: 3
output:
3
45
678
9123
45678
parkside should not exceed 10 while its seed should only be
not more than 9.. | | 4 |
| read the folllowing code
# define MAX 100
# define MIN 100
....
....
if(x>MAX)
x=1;
else if(x<MIN)
x=-1;
x=50;
if the initial value of x=200,what is the vlaue after
executing this code?
a.200
b.1
c.-1
d.50
| TCS | 2 |
| write a program to display the array elements in reverse
order in c language | | 6 |
| we all know about the function overloading concept used in
C++ and we all learnt abt that.... but that concept is
already came in C in a very smaller propotion ... my
question is IN WHICH CONCEPT THERE IS A USE OF FUNCTION
OVERLOADING IS USED in C language????????????? | Google | 2 |
| We can draw a box in cprogram by using only one printf();&
without using graphic.h header file? | NIIT | 3 |
| can we write a program in c for printf and scanf without
using header file stdio.h | | 1 |
| how to create c progarm without void main()? | | 1 |
| what is the output for the code :
main()
{
int i,j;
printf("%d %d ",scanf("%d%d",&i,&j));
} | Infosys | 14 |
| Can we include one C program into another C program if yes how? | Infosys | 4 |
| main()
{int a=200*200/100;
printf("%d",a);
} | TCS | 7 |
| |
| For more C Interview Questions Click Here |