| Other C Interview Questions |
| |
| Question | Asked @ | Answers |
| |
| Every time i run a c-code in editor,
getting some runtime error and editor is disposing,
even after reinstalling the software
what may be the problem? | | 2 |
| Write a program to interchange two variables without using
the third variable? | Accenture | 11 |
| Can u return two values using return keyword? If yes, how?
If no, why? | | 7 |
| plz answer....A program that takes 3 variables e.g a,b,c in
as seperate parameters and rotates the values stored so
that value goes a to b, b to c and c to a . | | 3 |
| the operator for exponencation is
a.**
b.^
c.%
d.not available
| TCS | 4 |
| How the C program can be compiled? | HP | 7 |
| how to find out the union of two character arrays? | | 1 |
| What is the Difference between Class and Struct? | Motorola | 9 |
| I have an array of 100 elements. Each element contains some
text. i want to:
append a star character to the end of every fifth element
remove every second character from every tenth element,
and…
add a line feed (ascii 10) after the 30th character of
every array element whose length is greater than 30
characters. | | 1 |
| Why cann't whole array can be passed to function as value. | | 1 |
| plz answer.... write a program that reads line (using
getline) e.g."345", converts each line to an integer
using "atoi" and computes the average of all the numbers
read. also compute the standard deviation. | | 1 |
| What should be keep precautions while using the recursion
method? | | 1 |
| what is mallloc()?how it works? | Excel | 3 |
| Which of the following about the C comments is incorrect ?
a.commentscan go over multiple lines
b.comments can start any where in the line
c.a line can contain comments with out any language statements
d.comments can occur within comments
| TCS | 6 |
| How do we swap or interchange any 2 numbers without using
Temporary variable...Anybody can pls answer it.. Thanks in
Advance | | 7 |
| whether itis a structured language? | Microsoft | 1 |
| Which of the following are valid "include" formats?
A)#include and #include[file.h]
B)#include (file.h) and #include
C)#include [file.h] and #include "file.h"
D)#include <file.h> and #include "file.h"
| Accenture | 14 |
| int arr[] = {1,2,3,4}
int *ptr=arr;
*(arr+3) = *++ptr + *ptr++;
Final contents of arr[]
| Hughes | 4 |
| int zap(int n)
{
if(n<=1)then zap=1;
else zap=zap(n-3)+zap(n-1);
}
then the call zap(6) gives the values of zap
[a] 8 [b] 9 [c] 6 [d] 12 [e] 15
| Wipro | 8 |
| write a program that finds the factorial of a number using
recursion? | | 1 |
| |
| For more C Interview Questions Click Here |