| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| design and implement a program that reads floating-points
numbers in a sentinel-controlled loop until the user
terminates the program by entering zero.your program should
determinate and print the smallest,largest and average of
the supplied numbers. | | 1 |
| 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 between array and structure?
| TCS | 19 |
| how to display 2-D array elements in spiral | | 1 |
| How can I call a function, given its name as a string? | ABC-Telecom | 2 |
| Write a program that takes three variables(a,b,c) in as
separate parameters and rotates the values stored so that
value a goes to b,b,to c and c to a | | 3 |
| what is the other ways to find a logic to print whether a
number is an even or odd wit out using % symbol??????? i
know three different ways to print it. so i need any other
different logic>>>>> | TCS | 3 |
| we have to use realloc only after malloc or calloc ? or we
can use initially with out depending on whether we are
using malloc or calloc in our program ? | | 1 |
| void main()
{
int i=5;
printf("%d",i+++++i);
}
| ME | 12 |
| void main(int argc,char *argv[],char *env[])
{
int i;
for(i=1;i<argc;i++)
printf("%s",env[i]);
} | | 2 |
| 5. What kind of sorting is this:
SORT (k,n)
1.[Loop on I Index]
repeat thru step2 for i=1,2,........n-1
2.[For each pass,get small value]
min=i;
repeat for j=i+1 to N do
{
if K[j]<k[min]
min=j;
}
temp=K[i];K[i]=K[min];K[min]=temp;
3.[Sorted Values will be returned]
A)Bubble Sort
B)Quick Sort
C)Selection Sort
D)Merge Sort
| Accenture | 2 |
| i=20,k=0;
for(j=1;j<i;j=1+4*(i/j))
{
k+=j<10?4:3;
}
printf("%d", k);
| HCL | 6 |
| pgm in c to reverse string by word using array(god is love
becomes love is god)
(no additional array can used,space is only delimiter
between words ) | Persistent | 1 |
| Given a single Linked list with lakhs of nodes and length
unknown how do you optimally delete the nth element from the
list? | Oracle | 1 |
| Given an unsigned integer, find if the number is power of 2? | | 4 |
| what does " calloc" do? | Cadence | 6 |
| Write a program to exchange two variaables without temp | Geometric-Software | 6 |
| which operator having lowest precedence??
a.)+ b.)++ c.)= d.)%
| | 4 |
| how to find turn around time in operating system? | | 1 |
| consider the following program sigment
int n,sum=1;
switch(n) {
case 2:sum=sum+2;
case 3:sum*=2;
break;
default:sum=0;}
if n=2, what is the value of sum
a.0
b.6
c.3
d.none
| TCS | 4 |
| |
| For more C Interview Questions Click Here |