| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| If we have an array of Interger values, find out a sub array
which has a maximum value of the array and start and end
positions of the array..The sub array must be contiguious.
Take the start add to be 4000.
For Ex if we have an array arr[] =
{-1,-2,-5,9,4,3,-6,8,7,6,5,-3}
here the sub array of max would be
{8,7,6,5} coz the sum of max contiguous array is 8+7+6+5 =
26.The start and end position is 4014(8) and 4020(5). | Microsoft | 3 |
| what about "char *(*(*a[])())();"
| Oracle | 2 |
| 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 |
| in C-programming language without using printf statement
can we get output r not ? if yes how and if no also how ?
| | 4 |
| 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 |
| 1.write a program to merge the arrays
2.write efficient code for extracting unique elements from a
sorted list of array? | Qualcomm | 1 |
| 9.how do you write a function that takes a variable number
of arguments? What is the prototype of printf () function?
10.How do you access command-line arguments?
11.what does #include<stdio.h> mean?
12.what is the difference between #include<> and #include
?
13.what are # pragma staments?
14.what is the most appropriate way to write a
multi-statement macro? | L&T | 4 |
| Given an array of length N containing integers between 1
and N, determine if it contains any duplicates. | | 2 |
| Define function ?Explain about arguments? | Geometric-Software | 2 |
| program to find the second largest word in a paragraph
amongst all words that repeat more thn twice | iGate | 2 |
| What is true about the following
C Functions
a.Need not return any value
b.Should always return an integer
c.Should always return a float
d.Should always return more than one value.
| TCS | 6 |
| What is false about the following
A compound statement is
a.A set of simple statments
b.Demarcated on either side by curly brackets
c.Can be used in place of simple statement
d.A C function is not a compound statement.
| TCS | 1 |
| f(*p)
{
p=(char *)malloc(6);
p="hello";
return;
}
main()
{
char *p="bye";
f(p);
printf("%s",p);
}
what is the o/p?
| Hughes | 2 |
| Add 2 64 bit numbers on a 32 bit machine | NetApp | 1 |
| How do we swap or interchange any 2 numbers without using
Temporary variable...Anybody can pls answer it.. Thanks in
Advance | US-Technology | 5 |
| Explain following declaration
int *P(void);
and
int (*p)(char *a);
| | 2 |
| what is the advantage of function pointer | TCS | 9 |
| IS STRUCTURES CAN BE USED WITHIN AN ARRAY? | Caritor | 7 |
| Is there any restriction in how many arguments printf or
scanf function can take?
in which file in my c++ compiler i can see the code for
implementation of these two functions?? | | 2 |
| Write a program to interchange two variables without using
the third variable? | Accenture | 9 |
| |
| For more C Interview Questions Click Here |