sidhartha


{ City } vizag
< Country > india
* Profession *
User No # 40746
Total Questions Posted # 0
Total Answers Posted # 28

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

Users Marked my Answers as Correct # 370
Users Marked my Answers as Wrong # 209
Questions / { sidhartha }
Questions Answers Category Views Company eMail




Answers / { sidhartha }

Question { Persistent, 8105 }

swap two integer variables without using a third temporary
variable?


Answer

#include
#include
void main()
{
int a,b;
clrscr();
printf("\n ENTER 2 VALUES : ");
scanf("%d%d",&a,&b);
printf("\n THE VALUES BEFORE SORTING : %d,%d",a,b);
a=a+b;
b=a-b;
a=a-b;
printf("\n THE VALUES AFTER SORTING : %d,%d",a,b);
getch();
}

Is This Answer Correct ?    40 Yes 1 No

Question { Punjab National Bank, 11461 }

What is application of mathematics in our life ?


Answer

If we want to measure the height,distance and the area of
the buildings and hills we use trigonometry chapter in
mathematics. simple calculations can also be used in shops,
stores etc., This is one of the main application in our
daily life.

Is This Answer Correct ?    16 Yes 2 No


Question { TCS, 32671 }

write a c program to find biggest of 3 number without
relational operator?


Answer

#include
#include
void main()
{
int a,b,c,big;
clrscr();
printf("\n ENTER 3 VALUES : ");
scanf("%d%d%d",&a,&b,&c);
big=(a>b && a>c ? a:b>c ? b:c);
printf("\n THE BIGGEST NUMBER IS : %d",big);
getch();
]

Is This Answer Correct ?    22 Yes 63 No

Question { 9665 }

1.what are two type of classe members called?
2.what is data hiding and data encapsulation?
3.how do you make a class member visible aouside its class?
4.what is the default visibility of a class data member?
5.what are the advantages of oop over the structured
programing?


Answer

1) Data members and member functions.
2) Wrapping up of data into a single logical unit is known
as data encapsulation.
3) By using public specifier in the class.
4) private specifier is the default visibility mode.
5) (a)It is a bottom up approach.
(b)Emphasis is on data.
(c)large programs can be divided into objects.
(d)objects have their relevant own data.

Is This Answer Correct ?    0 Yes 0 No

Question { Wipro, 11707 }

what is c programing


Answer

C is a procedural programming language.

Is This Answer Correct ?    18 Yes 4 No

Question { 3184 }

Generally, in all C++ programs, texts are in white colour.
Can we change the colour of the text(either input or output
or both)? If so, help me out.


Answer

Yes, it can be possible by using graphics library function.

Is This Answer Correct ?    2 Yes 0 No

Question { 4386 }

What is Dynamic Initialization.


Answer

Initializing the values of variables or array variables at
the time of execution (or)runtime.

Is This Answer Correct ?    3 Yes 3 No

Question { 5238 }

what are the advantage of pointer variables? write a program
to count the number of vowels and consonants in a given string


Answer

The advantage of pointer variables is to reduce the memory
space of another variables.

I don't know how to write the program for counting the
vowels and consonants. If anybody knows please mail to

sidhartha_karyampudi@rediffmail.com

Is This Answer Correct ?    3 Yes 0 No

Question { Infosys, 21189 }

write a c program to print "Welcome" without using semicolon
in the whole program ??


Answer

main()
{
if(printf("Welcome"))
{
}
}

(OR)

main()
{
if(printf("Welcome"))
}

Is This Answer Correct ?    13 Yes 5 No

Question { Xavient, 9390 }

write a program for 7*8 = 56 ? without using * multiply
operator ? output = 56


Answer

Here is the logic.
void func()
{
int i;
int result = 0;
for(i = 0; i < 8; i++)
{
result = result + 7;
}
printf("%d",result);
}

Is This Answer Correct ?    8 Yes 3 No

Question { Infosys, 26709 }

what is the difference between getch() and getche()?


Answer

Here are some examples for getch() and getche() to distinguish :

Example for getch() :

main()
{
getch();
}
OUTPUT : black screen(nothing is displayed)

Example for getche() :

main()
{
getche();
}
OUTPUT : u(the cursor waits for sometime untill you press
any key from the keyboard after pressing it immediately goes
to blue screen)

Is This Answer Correct ?    40 Yes 10 No

Question { Infosys, 5931 }

who is the father of c


Answer

Denis Ritchie at AT & T labs at Bell telephone laboratories
in 1972.

Is This Answer Correct ?    12 Yes 0 No

Question { Infosys, 7245 }

what is pointer ? what is the use of pointer?


Answer

Pointer is the address of the another variable.

It saves the memory space of another variables.

Is This Answer Correct ?    1 Yes 0 No

Question { Infosys, 7859 }

what is the difference between call by value and call by
reference?


Answer

Call by value means passing the values.

Call by reference means passing the address of the variables
given.

Is This Answer Correct ?    7 Yes 2 No

Question { 4043 }

what will be the output of the following program, justify?
#define TEST

int TEST getdata()
{
static i;
i+=10;
return i;

}

main()
{
int k;
k = getdata();
}



Answer

Since there is no output statement in this program there
output will not be displayed.

The output statement must be as follows :

printf("%d",k);

Then the output will be 10.

Is This Answer Correct ?    1 Yes 0 No

 [1]   2    Next