Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask C/C++ Expert


Home >> C/C++

problem 1)a)(i) Distinguish between realloc() and malloc() function in C.

(ii) Describe the purpose of each of the following declarations

1. int *p[10];

2. int (*p) [10];

3. int p (char *a);

4. int *p (char *a);

b) prepare a C program using pointers to read the array of integers and prints its elements in descending order.

problem 2)a) Differentiate union and structure. For what types of applications are unions useful?

b) Describe with suitable exs self referencing structure.

c) Describe nesting of structure with suitable ex. Can union be member of Structure and structure be a member of union? If yes, give suitable ex.

problem 3)a) What do you mean by the array of structures? Describe with appropriate ex.

b) Describe how to pass entire structure as parameter to function and how to return a structure from function.

c) Define a structure called Inventory that will describe following information:

i) Item_No

ii) Item_Name

iii) Unit_Price

iv) Quanitity_Recieved

v) Current_Count

vi) Supplier_Name

vii) Purchase_Date

Purchase_Date is member of another 'Date' structure. Using Inventory create array of items and prepare a C program to read the information about all items. While displaying final list find out and display the purchase price for each shipment. Sort the list in ascending order of Item_No.

problem 4)a) prepare a C program to count number of spaces on each line of text in a file.

b) Describe the following file handling functions in C with appropriate ex:

i) feof()

ii) ferror()

iii) fseek()

iv) ftell()

problem 5)a) prepare down the difference between text mode and binary mode.

b) prepare a C program to read integer number from user and display it in binary format using bitwise operator.

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M95679

Have any Question? 


Related Questions in C/C++

Pa 1 word countertabulating basic document statistics is an

PA #1: Word Counter Tabulating basic document statistics is an interesting exercise that leverages your knowledge of strings, files, loops, and arrays. In this homework, you must write a C++ program that asks the user fo ...

Computer programmingobjectives1 opening a file reading from

Computer Programming Objectives: 1. Opening a file, reading from file, writing to a file and closing a file. 2. Sequential access files handling. 3. Practice C++ programming problems. Note: Carefully read the following i ...

Writeacprogramthatwilluseloopstoperformeachofthefollowingtas

Write a C++ program that will use loops to perform each of the following tasks: 1. Ask the user for two characters from the keyboard and read them into char variables. Determine which input is larger and which is smaller ...

This program involves using stl listsfor this program you

This program involves using STL lists. For this program you will implement three functions whose prototypes are given below: list ::iterator mxIter(list ::iterator first, list ::iterator last); void selectSort(list & aLi ...

1 requirementsin this assignment you can unleash your

1. REQUIREMENTS In this assignment, you can unleash your imaginations and use OpenGL with C/C++ programming to produce a scene(s) that represents what you envision could possibly be seen under the sea. Please note that a ...

Objectives- gain experience with if if else and switch

Objectives - Gain experience with if, if else, and switch statements in C programs. - Experience using % operator and true false logic. Hints This program will be MUCH easier if you design how to do the logic in your own ...

C program assignmentaccording to C Program Assignment According to

C Program Assignment According to http://en.wikipedia.org/wiki/Great-circle_distance, the great circle distance based on two coordinates in nautical miles is given by: d = r * Δσ where r is the radius of the earth and Δσ ...

Assignment simple 5-card poker gamein this assignment you

Assignment: Simple 5-Card Poker Game In this assignment, you will develop a simple poker game, complete with basic AI, using the object oriented programming principles discussed in class. Flow of Play Your poker game's p ...

For this program you will add and test 2 new member

For this program you will add and test 2 new member functions to the IntSLList class posted on the website. The two member functions are: insertByPosn(int el, intpos) Assuming that the positions of elements of a list beg ...

Question 1you are facing the following problem you are

Question 1 You are facing the following problem: You are given a robot and your task is to "guide" the robot through a 2-dimensional maze such that the robot can reach a desired goal state. Assume that the maze is define ...

  • 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