| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Write a routine that prints out a 2-D array in spiral order! | Lucent | 1 |
| How to add two numbers with using function?
| | 3 |
| if the address of a[1,1] and a[2,1] are 1000 and 1010
respectively and each occupies 2 bytes then the array has
been stored in what order? | | 3 |
| write a program to print sum of each row of a 2D array.
| | 2 |
| Write a program to give following output.....
*********
**** ****
*** ***
** **
* *
** **
*** ***
**** ****
********* | | 2 |
| 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 |
| int *a[5] refers to | TCS | 8 |
| what is the use of using linked list and array? | Infosys | 9 |
| What is function pointer and where we will use it | NetApp | 1 |
| Program to trim a given character from a string. | NetApp | 4 |
| How to access or modify the const variable in c ? | HP | 4 |
| Write a program to generate prime factors of a given integer? | | 3 |
| write a program to print the all 4digits numbers & whose
squares must me even numbers? | Virtusa | 2 |
| 1.write a program to merge the arrays
2.write efficient code for extracting unique elements from a
sorted list of array? | Qualcomm | 2 |
| what is the use of keyword volatile?? | LG-Soft | 4 |
| i want the code for printing the output as follows
4 4
3 3
2 2
1 1
0
1 1
2 2
3 3
4 4 | | 1 |
| write a program to check whether a given integer is a strong
number or not?
[Hint:
145=1!+4!+5!
=1+24+120
=145]
| | 4 |
| What is the output of the following program
#include<stdio.h>
main()
{
int i=0;
fork();
printf("%d",i++);
fork();
printf("%d",i++);
fork();
wait();
} | ADITI | 5 |
| a.One Cannot Take the address of a Bit Field
b.bit fields cannot be arrayed
c.Bit-Fields are machine Dependant
d.Bit-fields cannot be declared as static
Which of the Following Statements are true w.r.t Bit-Fields
A)a,b&c B)Only a & b C)Only c D)All
| Accenture | 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 |
| |
| For more C Interview Questions Click Here |