| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| f(x,y,z)
{
y = y+1;
z = z+x;
}
main()
{
int a,b;
a = 2
b = 2;
f(a+b,a,a);
print a;
}
what is the value of 'a' printed | | 4 |
| #include<stdio.h>
main()
{
char s1[]="Ramco";
char s2[]="Systems";
s1=s2;
printf("%s",s1);
}
what will happen if you executed this code? | Ramco | 4 |
| What is the difference between big endian form and little
endian form? write a code to convert big endian form to
little endian and vice versa.. | Aricent | 1 |
| What is the memory allocated by the following definition ?
int (*x)(); | ADITI | 2 |
| what is the differance between pass by reference and pass
by value. | Infosys | 4 |
| Write a program to find the smallest and largest element in
a given array in c language | | 1 |
| Program to find the value of e raised to power x using while
loop | N-Tech | 3 |
| what is the code for getting the output as
*
**
*** | Caritor | 4 |
| main()
{
int i = 1;
int num[] = {1,2,3,4};
num[i] = i++;
printf("%d", num[i]);
}
what will be the output?
} | NDS | 12 |
| Would you rather wait for the results of a quicksort, a
linear search, or a bubble sort on a 200000 element array?
1) Quicksort
2) Linear Search
3) Bubble Sort
| | 2 |
| write a program to check whether a given integer is a strong
number or not?
[Hint:
145=1!+4!+5!
=1+24+120
=145]
| | 2 |
| code snippet for creating a pyramids triangle
ex
1
2 2
3 3 3 | | 2 |
| sqrt(x+sqrt(x+sqrt(x+sqrt(x))))=2;
Find the value of x? | Subex | 1 |
| 44.what is the difference between strcpy() and memcpy()
function?
45.what is output of the following statetment?
46.Printf(“%x”, -1<<4); ?
47.will the program compile?
int i;
scanf(“%d”,i);
printf(“%d”,i);
48.write a string copy function routine?
49.swap two integer variables without using a third
temporary variable?
50.how do you redirect stdout value from a program to a file?
51.write a program that finds the factorial of a number
using recursion? | | 3 |
| please give me some tips for the selection in TCS. | TCS | 3 |
| write a C code To reverse a linked list | Motorola | 1 |
| write a addition of two no. program with out using
printf,scanf,puts . | | 2 |
| What is encapsulation? | | 1 |
| Find Index of least significant bit set in an Integer. ex.
int value is say 10001000 results should be 4. | | 1 |
| How can I find out how much memory is available? | Persistent | 1 |
| |
| For more C Interview Questions Click Here |