| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| print ur name without using any semicolon in c/c++.... | | 4 |
| Program to display given 3 integers in ascending order | N-Tech | 1 |
| #include<stdio.h>
main()
{
char s1[]="Ramco";
char s2[]="Systems";
s1=s2;
printf("%s",s1);
}
Find the output | CitiGroup | 4 |
| Main must be written as
a.the first function in the program
b.Second function in the program
c.Last function in the program
d.any where in the program
| TCS | 10 |
| 7. Identify the correct argument for the function call
fflush() in ANSI C:
A)stdout
B)stdin
C)stderr
D)All the above
| Accenture | 6 |
| #include <stdio.h>
#define sqr(x) (x*x)
int main()
{
int x=2;
printf("value of x=%d",sqr(x+1));
}
What is the value of x?
| Oracle | 9 |
| f=(x>y)?x:y
a) f points to max of x and y
b) f points to min of x and y
c)error
| HCL | 3 |
| what is array? | | 5 |
| Implement a function that returns the 5th element from the
end in a singly linked list of integers in one pass. | Microsoft | 2 |
| write a C code To reverse a linked list | Motorola | 1 |
| 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 for the following series:
1*3*5-2*4*6+3*5*7-4*6*8+.................up to nterms | Convex-Digital | 4 |
| fn f(x)
{ if(x<=0)
return;
else f(x-1)+x;
}
| HCL | 3 |
| How can I call a function, given its name as a string? | ABC-Telecom | 1 |
| Find Error if any in below code, Justify ur answer:
struct xx
{
int a;
struct yy
{
char c;
struct xx* p;
}
struct yy* q;
} | NDS | 2 |
| why you will give me a job in TCS. | TCS | 5 |
| 52.write a “Hello World” program in “c” without using a
semicolon?
53.Give a method to count the number of ones in a 32 bit number?
54.write a program that print itself even if the source file
is deleted?
55.Given an unsigned integer, find if the number is power of 2? | | 3 |
| 24.what is a void pointer?
25.why arithmetic operation can’t be performed on a void
pointer?
26.differentiate between const char *a; char *const a;
and char const *a;
27.compare array with pointer?
28.what is a NULL pointer?
29.what does ‘segmentation violation’ mean?
30.what does ‘Bus Error’ mean?
31.Define function pointers?
32.How do you initialize function pointers? Give an example?
33.where can function pointers be used? | | 1 |
| what is c?
| Tech-Mahindra | 4 |
| biggest of two no's with out using if condition statement | | 2 |
| |
| For more C Interview Questions Click Here |