Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C PROGRAM NEED SAME OUTPUT PLZ DONOT GIVE WRONG O/P 1 - Read n & n person names of maxlen 20. Sort and print the

C PROGRAM NEED SAME OUTPUT PLZ DONOT GIVE WRONG O/P

1 - Read n & n person names of maxlen 20. Sort and print the names

Description:

Read the N name from the user

Sort it in alphabetical order

Use 1st dynamic and 2nd static. Char (*name)[20]

No.of names should be dynamic and no.of characters should be static.

Allocate the memory dynamically for no.of names.

Pr-requisites:-

Functions

Dynamic Arrays

Pointers

Objective: -

To understand the concept of

Functions, Arrays, and Pointers

Inputs: -

Array on N names, N

Sample execution: - Test Case 1: user@emertxe] ./sort

Enter the size: 5

Enter the 5 names of length max 20 characters in each [0] -> Delhi [1] -> Agra [2] -> Kolkata [3] -> Bengaluru [4] -> Chennai

The sorted names are: Agra Bengaluru Chennai Delhi Kolkata

requested file

#include

void sort_names(char (*)[20], int);

int main() { __fpurge(stdout); }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago