Ask Question, Ask an Expert

+61-413 786 465

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

Question - create a microsoft word macro using vba visual

Question - Create a Microsoft Word macro using VBA (Visual Basic for Applications). Name the macro "highlight." The macro should highlight every third line of text in a document. (Imagine creating highlighting that will ...

Task silly name testeroverviewcontrol flow allows us to

Task: Silly Name Tester Overview Control flow allows us to alter the order in which our programs execute. Building on our knowledge of variables, we can now use control flow to create programs that perform more than just ...

Assignment - proposal literature review research method1

Assignment - Proposal, Literature Review, Research Method 1. Abstract - Summary of the knowledge gap: problems of the existing research - Aim of the research, summary of what this project is to achieve - Summary of the a ...

Assignment task -q1 a the fibonacci numbers are the numbers

Assignment Task - Q1. (a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the ...

Extend the adworks applicationi add dialogs to allow the

Extend the AdWorks application I. Add Dialogs to allow the user to Add, Edit, Read and Delete a Customer and refresh the view accordingly. 1. The user should be able to select a specific customer from the DataGrid and cl ...

Structs and enumsoverviewin this task you will create a

Structs and Enums Overview In this task you will create a knight database to help Camelot keep track of all of their knights. Instructions Lets get started. 1. What the topic 5 videos, these will guide you through buildi ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Question 1 what is hadoop explaining hadoop 2 what is

Question: 1. What is Hadoop (Explaining Hadoop) ? 2. What is HDFS? 3. What is YARN (Yet Another Resource Negotiator)? The response must be typed, single spaced, must be in times new roman font (size 12) and must follow t ...

Question 1 what is a computer program what is structured

Question: 1. What is a Computer program? What is structured programming? 2. What is modular programming? Why we use it? 3. Please evaluate Sin (x) by infinite series. Then write an algorithm to implement it with up to th ...

  • 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

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As