Archive for 'C++ and C'
Agile C++ Test Questions
C++:
(1)the difference b/w pure virtual fn.& virtual fn.
(a)pure virtual function. is initialized to zero.
(b)
Posted: September 10th, 2007 under C++ and C.
Comments: none
Carritor C Interview Questions
1. Struct x
{
int i;
char c;
}
union y{
struct x a;
double d;
};
printf("%d",sizeof(union y));
a)8
b)5
c)4
[...]
Posted: September 9th, 2007 under C++ and C.
Comments: 1
C Interview Paper
C Paper:
1. What is the difference between Char a[ ]=”string” and char *a=”String”
2. What is wrong with the code? The code was for conversion from Celsius to Fahrenheit : degF =5/9*(c+32)
In code this line was wrong as we want 5/9 and that to be multiplied with bracket result. But here 9 will be first multiplied [...]
Posted: September 9th, 2007 under C++ and C.
Comments: 3
C programming Questions
C programming:
————-
some small C programs are given asked to tell the function/errors etc.
one of the question(last in the paper) is an invalid statement. finish of all these very fast and think about those others. they are simple only.
Posted: September 7th, 2007 under C++ and C.
Comments: 4
Sasken C Interview Questions
1) If u have a linked list library, how do u design stack and queue using it; write pseudo code.
2) What are static variables and functions?
3) Write code in C to count the number of 1s in a character (1byte).
4) What is pre-order, post-order, in-order; write code to print post-order.
5) Can u construct a binary [...]
Posted: September 6th, 2007 under C++ and C.
Comments: none
C++ Important Questions
Can we generate a C++ source code from the binary file?
What are inline functions?
What is “strstream” ?
What is encapsulation??
Containing and hiding information about an object, such as
internal data structures and code. Encapsulation isolates the
internal complexity of an object’s operation from the rest of
the application. For example, a client component asking for net
revenue from a business [...]
Posted: August 9th, 2007 under C++ and C.
Comments: 1
Arrays Interview Questions
You are given an array with integers between 1 and 1,000,000. One integer is in the array twice. How can you determine which one? Can you think of a way to do it using little extra memory.
You are given an array with integers between 1 and 1,000,000. One integer [...]
Posted: July 20th, 2007 under C++ and C.
Comments: 2
Linked List
You must be able to produce simple clean linked list implementations quickly.
Implement Insert and Delete for
singly-linked linked list
sorted linked list
[...]
Posted: July 20th, 2007 under C++ and C.
Comments: 1
Hardware related C Questions
1. What are the total number of lines written in C/C++? What is the most complicated/valuable program written in C/C++?
2. What compiler was used?
3. Have you studied buses? What types?
4. Have you studied pipelining? List the 5 stages of a 5 stage pipeline. [...]
Posted: July 19th, 2007 under C++ and C.
Comments: 2
Important C Interview questions
1. How do you write a program which produces its own source code as its output?
2. How can I find the day of the week given the date?
3. Why doesn’t C have nested functions?
4. What is the most efficient way to count the [...]
Posted: July 19th, 2007 under C++ and C.
Comments: 1
C++ Interview Question Implement itoa
Implementing itoa function is a popular interview question. Here’s one implementation from SAP.
char *itoa(int value)
{
int count, /* number of characters in string */
i, /* loop control variable */
sign; /* determine if the value is negative */
char *ptr, /* temporary pointer, index into string */
*string, /* return value */
*temp; /* temporary string array */
count = 0;
if [...]
Posted: July 19th, 2007 under C++ and C.
Comments: none