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
koban [17]
2 years ago
12

Write a c program to print all possible marking schemes of 15 questions each with 3.

Computers and Technology
1 answer:
andrey2020 [161]2 years ago
3 0

Answer:

#include <math.h>

#include <stdio.h>

#include <string.h>

#define BASE 3

#define NRQUESTIONS 15

void toABC(int n, char* buf, int base, int size) {

   memset(buf, 'A', size);

   buf[size] = 0;

   while (n && size) {

       buf[--size] = 'A' + (n % base);

       n /= base;

   }    

}

int main()

{

   char buf[16];

   for (int i = 0; i < pow(BASE, NRQUESTIONS); i++) {

       toABC(i, buf, BASE, NRQUESTIONS);

       printf("%s\n", buf);

   }

}

Explanation:

Assuming 3 is the number of possible answers to choose from for each question.

I tackled this by having an integer counter enumerate all values from 0 to 3^15, and then convert each integer to a base-3 representation, using ABC in stead of 012.

You might be interested in
Where are the instructions stored that the computer needs when it is switched on?
WARRIOR [948]
This is stored in the ROM (Read Only Memory)
I believe that is the answer, all i can come up with.
4 0
3 years ago
En la historia del Computador porque se caracteriza la primera generación? *
Nadusha1986 [10]

D. Por el uso de tubos de vacio.

8 0
3 years ago
How can a CRM system help communicate issues in the supply chain between customers and drones?
riadik2000 [5.3K]

Answer:

CRM system can help customers about the service supplied.  

Explanation:

CRM stands for Customer Relationship Management and CRM system is a useful tool for communicating with customers.

CRM can keep the data about the order provided by the customer and has updated info about its status.

For example, if the customer of a logistics company wants to know where his/her order is, customer represantative can give up-to-date info about the order where abouts. Or the customer directly uses web to check the status of the order.

All these service can be provided by a CRM system, since drones can send its location to CRM systems.

8 0
2 years ago
Jhon bought a new printer for his desktop computer. It does not work even though he checked all the cables and cords. What do yo
ExtremeBDS [4]
Im not for sure but it might be B or C
4 0
2 years ago
Read 2 more answers
This is not a factor that you should use to determine the content of your presentation. Your audience your goals your purpose yo
aksik [14]

Your technology I believe

4 0
3 years ago
Read 2 more answers
Other questions:
  • A trench is a narrow excavation in which the depth is greater than the width and the width does not exceed 15 feet. A. False B.
    13·2 answers
  • For which punctuation symbol will you use the ring finger of your right hand?
    9·1 answer
  • An optimal solution to a linear programming problem MUST lie A. somewere on the line between two corner points. B. somewhere out
    12·1 answer
  • Marissa, a 21-year-old young woman, is working as an intern at a software company. She has recently graduated from college. She
    6·1 answer
  • What do the buttons on the paste options menu do
    11·1 answer
  • Two employees were very different in terms of​ age, gender, and other demographic data but they shared a common love of dogs and
    8·1 answer
  • Today's Apple Mac computers run with the same internal hardware as the Windows-based PC.
    10·2 answers
  • Explain Http and Ftp​
    12·1 answer
  • What is the best method to avoid getting spyware on a machine
    6·1 answer
  • Since the size of cache is always smaller than the size of the main memory, the sum of bits of the offset and index of a cache w
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!