python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
using atoi to convert command-line arguments to int, is only returning the first digit entered
I have to use command line arguments to set up a map for a snake game for my uni assignment. We were not specifically told to use atoi to help convert the command line argument from string to int, How...
yer
Votes: 0
Answers: 2
How to declare a variable using string concatenation and use that variable to print and integer defined as variable in C?
Getting output as 0 instead of defined value
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char *val;
char MODE_VAR[1000]="MODE0";
int MODE0_SE...
Gaurav Panchanan
Votes: 0
Answers: 0
How should I fill in the printf statements in this code?
I have an assignment where we've been asked to analyze the code below and fill in what the printf staments should be. I'm kind of stuck, so any recommendations would be greatly appreciated.
#include &...
mindsmurf528
Votes: 0
Answers: 1
Is there a fast way to convert a string of 8 ASCII decimal digits into a binary number?
Consider 8 digit characters like 12345678 as a string. It can be converted to a number where every byte contains a digit like this:
const char* const str = "12345678";
const char* const base...

Serge Rogatch
Votes: 0
Answers: 4