Question Details

[solution] »

Hey Course Hero Tutors! I am working on a computer science assignment in C and I have no idea whe


Description

Answer Download


The Question

Hey Course Hero Tutors! I am working on a computer science assignment in C and I have no idea where to start. I am new to C and totally lost. I have so far found help seeking the x's and other help making all possible combinations of characters, but I can't seem to put them together to put the combinations back into the original string. Can anyone help?

This is the assignment:

Write a program called bin_str.c that completes a binary number. A
binary number is made up of 0's and 1's but the input strings you will receive can also contain 'x''s. An x represents a digit that can be either a 0 or a 1. Your program should display all the possible binary digits that can be formed. For example the string x1x0 could represent either 0100, 0110, 1100, or 1110.
1. Name your executable bin_str.out
2. Your program should accept the binary string as a command line argument
3. You MUST solve this program RECURISIVELY
4. Examples
1../bin_str.out 0110
0110
2../bin_str.out 01x0
0100
0110
3../bin_str.out xx
00
01
10
11

4../bin_str.out 101x100x11x
10101000110
10101000111
10101001110
10101001111
10111000110
10111000111
10111001110
10111001111

Restrictions

? No global variables are allowed

? Your main function may only declare variables and call other functions.


/*

 

* bin_str.c

 

*

 

* Created on: Jun 4, 2016

 

*

 

Author: nitinlodhi

 

*/

 

#include <stdlib.h>

 

#include <stdio.h>

 

#include <string.h>

 

int is_string_contains_x(char* str, int len) {...

 


Solution details

Solution #000121999

[solution] »

Hey Course Hero Tutors! I am working on a computer science assignment in C and I have no idea whe.zip

Uploaded by: Tutor

Answer rating:

This paper was answered on 21-Sep-2019

Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .

About this Question

STATUS

Answered

QUALITY

Approved

DATE ANSWERED

Sep 21, 2019

EXPERT

Tutor

ANSWER RATING

BEST TUTORS

We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.

You can also use these solutions:

  • As a reference for in-depth understanding of the subject.
  • As a source of ideas / reasoning for your own research (if properly referenced)
  • For editing and paraphrasing (check your institution's definition of plagiarism and recommended paraphrase).
This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student.

STUCK WITH YOUR PAPER?

Order New Solution. Quick Turnaround

Click on the button below in order to Order for a New, Original and High-Quality Essay Solutions. New orders are original solutions and precise to your writing instruction requirements. Place a New Order using the button below.

WE GUARANTEE, THAT YOUR PAPER WILL BE WRITTEN FROM SCRATCH AND WITHIN A DEADLINE.

Order Now