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 piece of code that dynamiccaly creates 1) a 1d char array of size 100 and 2) a 2d array having 4 rows where the first row has only one cell, second row has two cells, third row has three cell, fourth row has four cells. Now write the code to delete the arrays.


What is the size of an int variable and a char variable. What is the size of a variable which points to an int and a variable that points to a char. Now write a piece of code that displays the sizes of the data types mentioned above.


Write the output of the following


int main(){

   int array[5]={5,960,87,30,22};

   int *aptr = array;

   cout << array[0] << *array << *aptr<<endl;

   cout << array[4] << *array + 4 << *(array+4) << *(aptr+4);

}



Write a function which takes as argument two integers and prints all the prime numbers between those two numbers. If the first number is smaller than the second, the prime numbers would be displayed in an increasing order. If the first number is bigger than the second, the prime numbers would be displayed in an decreasing order.


Receive 3 numbers and display them in ascending order from smallest to largest


Draw a circle using line command in qbasic programming language


Write a C++ program that contain the following

functions:


a) Function travelCharge(char,int,int): this function will calculate and return the traveling

cost based on the given table.


Vacation Places Places ID Adult (RM) Children (RM)

Pangkor Island P 350 175

Bukit Merah B 200 100

Teluk Batik T 80 40


b) Function hotelCharge(int,int): this function will receives vacation packages as input

from the user. Then, calculate and return the hotel charge. The hotel charge (per room) is

based on the given table.

Vacation Packages Package ID Price per day and per room (RM)

Deluxe D 430

Standard S 270

Economy E 100


c) Write the main program to input the customer’s name, vacation places (P, B or T), number

of adults in the group, number of children in the group, number of days going for vacation

and number of hotel rooms booked. Then, by using functions above, calculate the cost for

travel and hotel. Finally, display the total payment a customer has to pay.


Read an integer array of 10 positive elements, and a value to search, count how many times that value occurs in the array if it occurs exactly twice then replace its second occurrence with -1. Display the indexes where that value occurred and the modified array afterwards.

how many 60KB jpg files can be stored on a 2MB folder in your hard drive?


Write a program to output the following

___

( ‘ ‘ )

( (

) )

( (

) )

( (

) )

( (

) )

V


LATEST TUTORIALS
APPROVED BY CLIENTS