Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Stub Program for Problem 3 HW 2
// Stub program for Problem 3 HW 2 Fall 2016 #include <stdio.h> #define SIZE 30 #define ERROR -1 ////////////////////////////////////////////////////////////////////// // Function name: binaryConvert // // Description: Converts the contents of a source string representing // a binary number to its equivalent unsigned integer. // // Input parameters: // char *binaryString, a pointer to the source string. // // Returns: // unsigned int // unsigned int binaryConvert(char *binaryString) { // Your code goes here! return(0); } int main(void) { // my array for the string char myString[SIZE]; // returned value unsigned int convertedValue; printf("\n*** Stub program for Problem 3 -- binaryConvert ***\n\n"); // First read in an input string if (fgets(myString, SIZE, stdin)) { // input has worked, print out the original string printf("Read in the string \"%s\".\n\n",myString); // Call your routine convertedValue = binaryConvert(myString); // Print out the result printf("After function call the value returned is %d.\n\n",convertedValue); } else { printf("Error reading in the string!\n"); } return 0; }
run
|
edit
|
history
|
help
0
WHY_?
Even odd program
Euclides MIRAR
3468
etapa final de pregunta 2
SumIt
Command Expressions in Gnu C: What Does Return Return?
lab 12 v1
problemapi3
CstructProduct