Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

pavan


{ City } bangalore
< Country > india
* Profession * senior software engineer
User No # 48412
Total Questions Posted # 0
Total Answers Posted # 6

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 43
Users Marked my Answers as Wrong # 32
Questions / { pavan }
Questions Answers Category Views Company eMail






Answers / { pavan }

Question { TCS, 11113 }

Write A C++ Program To Input A Number Between 20 To 99 And
Display Its Numbername?


Answer

#include
using namespace std;

void main()
{
char *arr1[9]=
{"one","two","three","four","five","six","seven","eight","ni
ne"};
char *arr2[8]=
{"twenty","thirty","fourty","fifty","sixty","seventy","eight
y","ninety"};
int num;

cout << "Enter A Number:"<< endl;
cin >> num;

cout << arr2[(num / 10) - 2];

if((num % 10) != 0)
cout << " " << arr1[(num % 10) -1];
}

Is This Answer Correct ?    4 Yes 8 No

Question { 3896 }

plz send me all data structure related programs


Answer

To start with data structures, Linked lists comes 1st.
Hands on experience with the following questions will give
good confidence to a programmer.
1. Creating a list (Single linked list or double linked
list)
a. add node to front of the list
b. add node to end of the list
c. add node to middle of the list
d. Delete first node
e. Delete last node
f. Delete middle node
2. Identifying Loop or circle in a single linked list
3. Reversing a linked list(single and double)
4. finding middle node of a list
5. All the above programs can be extended to develop a
generic linked list even.

In the above programs stacks and queues concepts are
covered. To develop Stack LIFO concept is followed.
To develop Queue FIFO concept is followed.

Is This Answer Correct ?    1 Yes 0 No


Question { Apple, 19529 }

how to find out the maximum number out of the three inputs.


Answer

//Single statement code using ternary operator

int max(int a, int b, int c)
{
return (((a > b) ? a : b) > c) ? ((a > b) ? a : b) : c;
}

Is This Answer Correct ?    14 Yes 8 No

Question { HCL, 7638 }

main()

{

int i;

float *pf;

pf = (float *)&i;

*pf = 100.00;

printf("\n %d", i);

}

a. Runtime error.

b. 100

c. Some Integer not 100

d. None of the above


Answer

d) Some junk number because floating value is stored in
integer via pointer pf.

Is This Answer Correct ?    10 Yes 1 No

Question { 3180 }

what is variable length argument list?


Answer

Check out the below link!!! it gives a nice insight of this
concept.

http://www.cprogramming.com/tutorial/c/lesson17.html

Anyways, this is about a function accepting variable number
of arguments i.e., at different places of calling that
function, number of arguments can differ.

Example:
int Some_func( int param1, ... ); is the declaration to it.

the 3 dots (called ellipsis) tells the compiller that it
accepts variable number of arguments.

Is This Answer Correct ?    2 Yes 0 No

Question { Infotech, 15484 }

Write a C program to add two numbers before the main function
is called.


Answer

#include

int func()
{
int a = 10;
int b = 20;
printf("\nExecuting func FIRST...\n");

printf("Sum of the two numbers is %d", (a + b));
return (a + b);
}

int x = func();

int main(int argc, char* argv[])
{
printf("\nExecuting Main LAST...\n");
return 0;
}

Is This Answer Correct ?    12 Yes 15 No