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

Assignmentthis is the programthis program will use 2

Assignment This is the program: This program will use 2 different data structures to perform the same tasks; a vector and a dynamically sized array Write a complete C++ program that will: Declare a vector of integers wit ...

Programming assignment image processing - pointers class

Programming Assignment: Image Processing - Pointers, Class & Dynamic Data This project is called "Image Processing" which will shrink an input image, convert a color image to gray image , add random noise to an image, ad ...

A compiler that translates a high-level language into

A compiler that translates a high-level language into another high-level language is called a source-to-source translator. What advantages are there to using C as a target language for a compiler?

Write a console-based c program that can be used as a math

Write a console-based C++ program that can be used as a math tutor for a young student. The program should display two random numbers consisting of three digits each to be added in columnar format, such as: 247 +129 ---- ...

Programming in cbubba tubs bbq rub is a company that makes

Programming in C++ Bubba Tub's BBQ Rub is a company that makes different BBQ dry rubs and sauces. They make each product when it is ordered with the freshest ingredients and sell it by the unit. A unit is 2 ounces of pro ...

Assignmentgoals developing problem-solving skills declaring

Assignment Goals: Developing problem-solving skills, declaring variables, multi-way branches, data validation. Problem: Complete Programming Challenge 4.19 in your text book. Do not accept values larger than 10 meters or ...

C-programmingcreate a c program that sorts a sequence of

C-Programming Create a C program that sorts a sequence of positive numbers using the bubble sort algorithm in an increasing or decreasing order based on the user's choice. The pseudo code for the bubble sort algorithm is ...

Assignmentinstructionsthis assignment is to implement your

Assignment Instructions This assignment is to implement your own mini-grocery store in C++. Suppose you have the following Food hierarchy: FOOD FRUIT APPLE BANANA GRAPE DAIRY MILK YOGURT CHEESE (your choice) (three items ...

Computer scienceyou have gathered your information on the

Computer Science You have gathered your information on the AI for the Tic-Tac-Toe game and began to develop your own ways to improve it using C++. Now, it's time to present your findings in a final paper. Remember that y ...

Design implement test and debug a c program to simulate the

Design, implement, test, and debug a C# program to simulate the rolling of two dice 100 times. Whenever the two dice display the same number, the program should show the roll sequence number (e.g. the 10th roll) and the ...

  • 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

WalMart Identification of theory and critical discussion

Drawing on the prescribed text and/or relevant academic literature, produce a paper which discusses the nature of group

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro