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

If a structure in the C language has to be initialized through both memory allocation and default field setting, and if these tasks are to be conveniently accomplished inside a function, then describe how the indicated function has to be coded, which input arguments it may accept, and how it may be called in practice.


Write a program that will read an arbitrary number of sets of triangle sides using only integer values.  

  1. Prompt the user for sets of numbers and process them until the user submits the numbers 0 0 0, which will terminate the program.
  2. For each set of three numbers, the program should print the values read.
  3. For each set of three numbers, the program should decide if the numbers represent the sides of a valid triangle.
  4. If the numbers could not represent a valid triangle, display an appropriate error message.
  5. If the numbers are valid, the program should determine, and display, the:
  6. classify sides of the triangle – equilateral, isosceles, or scalene
  7. classify angles of the triangle – right, acute, or obtuse

You need to have functions for the following tasks:

  1. do the 3 side length form a triangle
  2. classify the triangle by side lengths
  3. classify the triangle as right or non-right triangle

Sample run:

Provide three side lengths – 0 0 0 to terminate.

3

5

4

3 5 4 Triangle possible: Scalene and Right


Write a C++ program to create a calculator for the number by creating a class of numbers overloading all operators in it.

Operators to use in the program are: 

++ , -- , + , - , / , * , >> , << 

Write a program in C++ that takes two 4 x 4 matrices as input from the user and displays the matrices in tabular form. Then ask the user to make a choice: 1. Press 1 for matrix addition 2. Press 2 for matrix subtraction 3. Press 3 for matrix multiplication 4. Press 4 for matrix transpose Use 2D arrays to save matrix values and use functions to perform addition, subtraction, multiplication, and transpose.


Write a c sharp program that computes the circumstance and area of a circle. Declare pi as constant with value of 3.1416.


float x = 4.3, y = 9.2;

bool a = false;

1. ((x < 5) && (y < 10))

2. !((x < 5) && (y < 10))

3. ( !(x < 5) || !(y < 10))

4. (x >= 5) || (y >= 10))

5. !((x >= 5) || (y >= 10))

6. ( !(x >= 5) && !(y >= 10))

7. ((x < 5) && (y > 10))

8. ((x < 5) || !(y < 10))

9. !((x >= 5) && (y != 10))

10. !a && !(y >= 10))


EXP CURRENT VALUE OF x

1. x = 36; __________________

2. x += 13; __________________

3. x = x - 23; __________________

4. x -= 32; __________________

5. x++; __________________

6. x -= 2; __________________

7. x--; __________________

8. x = x + 6; __________________

9. x += 17; __________________

10. x -= 4; __________________





Write a function to parse the below pattern onto a text file and highlight the matched pattern using the sliding window concept.
AATAA
ATTAAA
TATA
CAT
ATAGTCGC


Expected output
Sliding window 1: First 32 bases from 2048
TTTATGTGCCCCCCCCCATTTTATTTT
----
Till you get last 32 bases

Explain the limitation of PCI bus sharing


String Slicing
Given two strings 
inputString and subString as inputs, write a JS program to slice the inputString if it includes the subString. Slice the inputString starting from the subString to the end of the inputString.Input
The first line of input contains a string inputString
The second line of input contains a string subString
Output
The output should be a sliced string or inputString (if the inputString does not include the subString)
Sample Input 1
JavaScript
S
Sample Output 1
Script
Sample Input 2
Language
air
Sample Output 2
Language
"use strict";
function readLine() {
 return inputString[currentLine++];
}
function main() {
 let inputString = readLine();
 const subString = readLine();
 /* Write your code here */ 
 console.log(subString.substr(inputString.substr(subString)));
}

Write a program using one-dimensional array that searches a number if it is found on the list of the given 5 input numbers and locate its exact location in the list.


Sample input/output dialogue:


Enter a list of numbers: 5 4 8 2 6

Enter a number to be searched: 2 2 found in location 4



LATEST TUTORIALS
APPROVED BY CLIENTS