1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
fgiga [73]
4 years ago
12

C programmig : Output all combinations of character variables a, b, and c, using this ordering:abc acb bac bca cab cbaSo if a =

'x', b = 'y', and c = 'z', then the output is: xyz xzy yxz yzx zxy zyxYour code will be tested in three different programs, with a, b, c assigned with 'x', 'y', 'z', then with '#', '$', '%', then with '1', '2', '3'.
Computers and Technology
2 answers:
Goryan [66]4 years ago
8 0

Answer:

// Here is code in C.

#include "stdio.h"

// create function to print all the combinations

void print_combi(char a,char b,char c)

{

// print all combinations of three characters

   printf("%c%c%c %c%c%c %c%c%c %c%c%c %c%c%c %c%c%c\n",a,b,c,a,c,b,b,a,c,b,c,a,c,a,b,c,b,a);

}

// driver function

int main(void)

{

// create 3 char variable and initialize

char a='x',b='y',c='z';

// call the function

print_combi(a,b,c);

printf("\n");

// initialize with different character

a='1',b='2',c='3';

// call the function

print_combi(a,b,c);

printf("\n");

// initialize with different character

a='#',b='$',c='%';

// call the function

print_combi(a,b,c);

printf("\n");

return 0;

}

Explanation:

Create three char variables a, b, c. First initialize them with x, y, z. then call  the function print_combi() with three parameters . this function will print all the combinations of those characters.We can test the function with different values of all the three char variables.

Output:

xyz xzy yxz yzx zxy zyx

123 132 213 231 312 321

#$% #%$ $#% $%# %#$ %$#

OlgaM077 [116]4 years ago
3 0

A C program to find all combinations of character variables:

void main ()

{

       char f;

       char s;

       char t;

       f = 'x';

       s = 'y';

       t = 'z';

       System.out.print("" + f + s + t + " " + f + t + s + " " + s +f + t +

       " " + s + t + f + " " + t + f + s + " " + t + s + f);

  }

}

You might be interested in
Who made the Apple company?
Firdavs [7]
Steve Jobs, Steve Wozniak, Ronald Wayne
6 0
3 years ago
Read 2 more answers
In an experiment in which participants sat in an office and then were asked to remember what they saw in the office, participant
Inessa [10]

Answer:

The answer to this question is the "schemas".

Explanation:

A schema is plural schemata or schemas that defines a pattern of logic or action that constitutes classifications of data and the connections among them. In a computer science schemas is an organized structure for a database and all the operation of data modeling leads by schema. So the answer to this question is schemas

6 0
3 years ago
with the current computer development, explain 5th areas where computer is applied for the social economic dwvelopment in societ
AleksandrR [38]

Explanation:

just want points tbh but have a good day

7 0
3 years ago
Strfrtvt tr rt tr trrrttr rrt
solong [7]

Answer:

????......???...................

5 0
3 years ago
Amy, a project manager, needs to make a plan that ensures consistent delivery of the right message to the right people at the ri
AleksAgata [21]
I would have to say the answer is D.) A communication plan. Hope this helps! :-)
7 0
3 years ago
Other questions:
  • Judy is searching for files with a .jpg file extension on her laptop. Which type of file is she looking for?
    13·2 answers
  • The ____ loop stops when the loop has processed every element in an array.?
    7·1 answer
  • If a domain consists of dcs that are running versions of windows server earlir than windows server 2008, what replication method
    12·1 answer
  • By which method is heat transferred through a metal <br> spoon?
    9·2 answers
  • In Shoreville, the last low tide was at 12:00 a.m. About what time will the next high tide occur?
    8·2 answers
  • : how do network effects help facebook fend off smaller social-networking rivals?
    7·1 answer
  • Which can be used to plan a program?
    13·2 answers
  • Cómo surge y cuál es el objetivo del observatorio de radio y televisión
    11·1 answer
  • Lists are indexed by an ________. a. float b. integer c. string d. All of the above​
    8·1 answer
  • Can someone help on number 8? Plz
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!