Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask Programming Language Expert

problem1)a) prepare a program that fills a matrix as follows:

• Both diagonal elements as 1’s .

• Rest of the elements as 0’s

The program should display the contents of the matrix using not more than two printf  statements.

b) Define a structure called "Cricket" that will describe the following information:

Player _name,
DOB,
Team_name,
Batting_average

where DOB is itself another structure which have the members Date, Month, Year. Using cricket declare an array “player” with 10 elements and prepare a program to read the information about all the 10 players and print a team-wise list containing names of players, their DOB and batting average.

problem2)a) If m and n have been declared as integers and p1 and p2 as pointers to integers, then state errors, if any, in the following statements:

i) p1=&m;

ii) p2=n;

iii) *p1=&n;

iv) p2=&*&m;

v) m=p2*p1;

vi) p1=&p2;

vii) m=p1*+p2*++;

b) prepare a program that reads a file containing integers and appends at its end the sum of all the integers. The file name is supplied in the command line.

problem3)a) How will you represent the following arrays as a sparse array using vector representation?

0 2 0 0 0 0 0
4 0 0 0 0 0 1
0 0 0 0 0 5 0
0 0 0 1 3 0 0
0 8 0 0 0 0 0
7 0 0 0 0 0 0
0 0 6 0 0 2 0

b) Convert the expression 2+3-5/7 * 8+4/5 into RPN . Evaluate it in RPN notation.

problem4)a) Modify the function “ add _term” given at page 35 of Block 3 so that after adding a term to the existing polynomials no term have zero coefficient.

b) Traverse the tree given below in preorder, inorder and postorder.

2180_Tree.jpg

c) Check whether the following tree is complete or not.

739_Tree_1.jpg

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M92600

Have any Question? 


Related Questions in Programming Language

Add a swift class file to the project that illustrates and

Add a SWIFT class file to the project that illustrates and contains the following: • The class name is 'Calculator' • Has public variables of the type float called numerator, denominator and total. • Has a method called ...

Complete the attached code and do junit testing can you

Complete the attached code and do junit testing. Can you help with this? Testing class tests Check Date methods serves as a "test plan" for developer's testing. Complete/correct and test/demonstrate using Junit with test ...

Write a program to test for the case of a math equation

Write a program to test for the case of a math equation entered via the keyboard using the SWITCH-CASE operator. Types of equations to test for: x + y  x / y   x * y and x - y. The program is to ask for the following: 1. ...

Programming lab assignment set awhat to submitcomplete

Programming Lab Assignment (Set A) What to Submit Complete Problem Solving Steps 1 - 3 (check plan, data analysis, initial algorithm, and refinement algorithm) for the following programs. 1. (Name: lab1a-1.cpp) Write a p ...

Integrative programmingassignment- managing a user account

Integrative Programming Assignment- Managing a User Account List Objective: To manage a user list that can be modified and saved to a text file. Inputs: • Input text file consisting of pairs of usernames and passwords, s ...

Questioncomplete tutorial 10 case problem 2 - ridgewood

Question: Complete Tutorial 10 Case Problem 2 - Ridgewood Herald Tribune found on pages 734-736 of your textbook. Complete the entire website assignment and upload your files to your 000WebHost account. After uploading t ...

Object oriented system analysis and design1non-functional

Object Oriented System Analysis and Design 1. Non-Functional Requirements a) Analysis of NFRs Analyse the Case Study documents and determine the non-functional requirements (NFRs) or system quality attributes necessary t ...

1 tic tac toein a tic tac toe game two players x and o take

1 TIC TAC TOE In a Tic Tac Toe game two players, X and O, take turns to mark the spaces in a 3X3 grid. The winner will be the player who first succeeds in placing three of his/her marks in a horizontal, vertical, or diag ...

Shell programmingyou have created the directory structure

Shell Programming You have created the directory structure and some base files to be used by the Web server and Web site. For the Web site to be created in a production environment, you need to package your commands in a ...

1 implement dfs by using prolog2 implement bfs by using

1. Implement DFS by using PROLOG. 2. Implement BFS by using PROLOG. 3.  Solve the problem of Question 3 in Assignment 1 by using your PROLOG programs of DFS and BFS, respectively. Question 3 from Assignment 1 to Solve wi ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate