Programming & Computer Science Answers

C++ 9913
Python 5288
Java | JSP | JSF 3611
C 1680
C# 1362
Computer Networks 989
Algorithms 652
Databases | SQL | Oracle | MS Access 641
HTML/JavaScript Web Application 588
Other 537
Visual Basic 358
Assembler 209
Software Engineering 202
AJAX | JavaScript | HTML | PHP 166
MatLAB 150
MatLAB | Mathematica | MathCAD | Maple 124
Action Script | Flash | Flex | ColdFusion 112
UNIX/Linux Programming 89
Web Development 73
Excel 36
ASP | ASP.NET 23
Delphi | Pascal 21
Perl 16
Prolog 9
Functional Programming 9
MathCAD 5
Wolfram Mathematica 4
WPF 4
Ruby | Ruby on Rails 3
NodeJS Web Application 2

Questions answered by Experts: 26 876

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

Write a program which displays all the ASCII characters on the screen.
Write a program which takes as input two integers and displays the sum of all the integers that lie between those two numbers. E.g., if x is 4 and y is 8, the answer would be 18 and if x is 8 and y is 4, the answer would be 18.
Write a program which takes as input and integer and prints "prime number" if it is a prime number. Hint: Suppose the number is 7 - divide it by 2 then 3 then 4 then 5 then 6 - if in any division, the remainder is zero, that means the number is not a prime.
What is the output of the following:

a) int x=10, y=20;cout<<x+++++y;
b) int x=10, y=20;cout<<x++-++y;
c) int x=10, y=20;cout<<++x+y++;
d) for(int x=0;x<10;x++)cout<<x;
e) for(int x=0, y=3; x<2*y; x++,y--)cout<<x;
What will be the output of the following:

a) int n=10, d=0; if(x!=0 && n%d==0)cout<<"d divides n";

b) int n=10, d=0; if(n%d==0 && x!=0 )cout<<"d divides n";

c)
char key = 'y';
switch (key) {
case ‘y':
case ‘Y':
cout << "You choose \“y\"\n";
case ‘n':
case ‘N':
cout << "You choose quit\n";
break;
default:
cout << “invalid input\n”;
}


d)
int x=10;
if(x!=10)
if(x>10){
cout<<"big";
}
else{
cout<<"small";
}

e)
int x=10;
int main(){
if(1){
int x=30;
cout << x << endl;
x=x+1;
}
cout << x;
}
Write an if statement which is equivalent to "if(!(x==0 || x==100))" but does not use the "||" operator.
a program which takes as input two floating point numbers and prints "equal" if the two are equal.
a program which takes as input two integers and then displays the maximum of the two numbers. You HAVE to use a ternary operator for this purpose.
Write a program to search the array element. Enter a value from the keyboard and find out the location of the entered value in the array.
Create two classes:
BaseClass
The Rectangle class should have two data fields-width and height of int types. The class should have display()method, to print the width and height of the rectangle separated by space.
DerivedClass
The RectangleArea class is derived from Rectangle class, i.e., it is the sub-class of Rectangle class. The class should have read_input() method, to read the values of width and height of the rectangle. The RectangleArea class should also override the display() method to print the area (width*height) of the rectangle.
LATEST TUTORIALS
APPROVED BY CLIENTS