Ask Question, Ask an Expert


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,

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.


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


Programming Language, Programming

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

Have any Question? 

Related Questions in Programming Language

The briefyour small development team of ideally three

The Brief Your small development team of (ideally) three people has been asked to implement and test the Human Resource Information System desktop application. Your software product will be a database- backed desktop app ...

Cp1404cp5632 2016 sp22252 assignment 1 - shopping list

CP1404/CP5632 2016 SP2/22/52 Assignment 1 - Shopping List 1.0 Task: You are to plan and then code a console-based program in Python 3, as described in the following information and sample output. This assignment will hel ...

Electrical engineering computer methods assignmentq1 write

Electrical Engineering Computer Methods Assignment Q1. Write a program that given the following array, reverses all array elements and then prints them. int x[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; Q2. Write a program to d ...

Write a program that calculates several possible tips to

Write a program that calculates several possible tips to give to a waiter at a restaurant. Ask the user to enter the total cost of the meal and then calculate a tip at 10%, 12.5%, 15%, 17.5%, and 20%. Write the original ...

Purposethe purpose of this assignment is to practice using

Purpose: The purpose of this assignment is to practice using loops, selections, and other basic features of Java in order to solve a real-world problem. Program Description: The Jeddah Broker Company is one of the compan ...

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 ...

Pair programming phase 1talent agency user stories1 user

Pair Programming Phase 1 Talent Agency User Stories 1. User Story 1 As a head office administrator I want to be able to produce formatted output of all the information about our talent agencies so that I can easily incor ...

Assignmentyou will write a program that acts like a simple

Assignment You will write a program that acts like a simple calculator for binary numbers. You should read in a string of input that has the format: number operator number. Each of the numbers should be presented in two' ...

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 ...

Operating systems assignment-1 binary record sorting in

Operating Systems Assignment- 1. Binary Record Sorting in Ascending Order| You will write a simple sorting program. This program should be invoked as follows: shell% ./fastsort -i inputfile -o outputfile The above line m ...

  • 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