UrbanPro

Learn C Language from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

How do I swap n number of strings in C programming?

Asked by Last Modified  

Follow 5
Answer

Please enter your answer

void swap34(float *ptr1, float *ptr2); void main() { float x; int i, n; printf("How many Elements...\n"); scanf("%d", &n); printf("Enter Elements one by one\n"); for (i = 0; i < n; i++) { scanf("%f", x + i); } /* Function call:Interchanging...
read more
void swap34(float *ptr1, float *ptr2); void main() { float x[10]; int i, n; printf("How many Elements...\n"); scanf("%d", &n); printf("Enter Elements one by one\n"); for (i = 0; i < n; i++) { scanf("%f", x + i); } /* Function call:Interchanging 3rd element by 4th */ swap34(x + 2, x + 3); printf("\nResultant Array...\n"); for (i = 0; i < n; i++) { printf("X[%d] = %f\n", i, x[i]); } } /* Function to swap the 3rd element with the 4th element in the array */ void swap34(float *ptr1, float *ptr2 ) { float temp; temp = *ptr1; *ptr1 = *ptr2; *ptr2 = temp; } read less
Comments

Advance Excel And VBA Training

If you want to swap a number of string then it will be a char array length equals to number of digits. Then its pretty simple you just need to run a for loop starting from i=0 to i read more
If you want to swap a number of string then it will be a char array length equals to number of digits. Then its pretty simple you just need to run a for loop starting from i=0 to iread less
Comments

Engineer

swapping means changing the places first include header files and write the body of a program and then decleare the string syntax then output
Comments

View 1 more Answers

Related Questions

How can you be sure that a program follows the ANSI C standard?
The ANSI C standard provides a predefined symbol named __STDC__ that is set to 1 when the compiler is enforcing strict ANSI standard conformance. If you want your programs to be 100 percent ANSI conformant,...
Vibha
Is a default case necessary in a switch statement?
NO, default is optional and you can omit it if there is no use of it.
My
What are the types of linkages in C Programming?
EXTERNAL,INTERNAL,NONE are 3 types of linkage in C programming
Akash
0 0
9
Give the structure of 'C' programming. Also, give significance of math.h and string.h header files.
Hi, C structure is procedural programming. math.h and string .h will have a declerations of predefined methods. math.h ex: sqrt(),...etc. string.h ex: strlen(),strcpy,...etc. if you wanna brif let meknow. Thanks.
Ishwari

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Operators in C
Operators in C Operator: An operator is a symbol that tells the compiler to perform certain mathematical or logical calculations. Operators are used in programs to manipulate data and variables. The...


C Program-Error Handling[Program Exit Status]
//Header files #include<stdio.h>#include<conio.h>#include<stdlib.h> //Main Function void main(){ int dividend=20; int divisor=5; int quotient; //Function for clearing screen clrscr();...
S

Lets know about far, near and huge pointers for fresher interview purpose
All of these three candidates relate to 16 bit architecture where segmented memory architecture was there. They are not at all relevant for present days 32 or 64 bit architecture where the way of memory...

Advantages of C++ Language
Advantages of C++ - C++ is a profoundly convenient dialect and is frequently the dialect of decision for multi-gadget, multi-stage application advancement. - C++ is a protest situated programming dialect...

Recommended Articles

Lasya Infotech is a Hyderabad based IT training institute founded in 2016 by O Venkat. Believing in his innovation, passion and persistence and with a diverse blend of experience, he started his brainchild to deliver exemplary professional courses to aspiring candidates by honing their skills. Ever since the institute envisions...

Read full article >

Brilliant Academy is one of the reputed institutes for B.Tech tuition classes. This institute is specialised in delivering quality tuition classes for B.E, Engineering - all streams and Engineering diploma courses. Incorporated in 2012, Brillant Academy is a brainchild of Mr Jagadeesh. The main motto of the academy is to...

Read full article >

Applications engineering is a hot trend in the current IT market.  An applications engineer is responsible for designing and application of technology products relating to various aspects of computing. To accomplish this, he/she has to work collaboratively with the company’s manufacturing, marketing, sales, and customer...

Read full article >

Microsoft Excel is an electronic spreadsheet tool which is commonly used for financial and statistical data processing. It has been developed by Microsoft and forms a major component of the widely used Microsoft Office. From individual users to the top IT companies, Excel is used worldwide. Excel is one of the most important...

Read full article >

Looking for C Language Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for C Language Classes?

The best tutors for C Language Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn C Language with the Best Tutors

The best Tutors for C Language Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more