Skip to main content

Questions tagged [variables]

The tag has no usage guidance.

6 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0 votes
1 answer
18 views

How do I combine variables and words in a sentance?

printf("%i\n", quarters, "quarters,", "%i\n", dimes, "dimes,", "%i\n", nickels, "nickels", "%i\n", pennies, "pennies.");...
Harr's user avatar
  • 35
0 votes
1 answer
25 views

pointers and addresses

int m=10; int *ab=&m; printf("address of *ab:%p\n",&*ab); printf("adress of ab:%p\n",&ab); output: address of *ab:0x7ffd85fddefc adress of ab:0x7ffd85fddf00 i ...
Praneeth Kumar's user avatar
0 votes
1 answer
49 views

Problem with pointers, getting seg fault while indexing with variable instead of plain number

I would like to ask why is that giving me seg fault. int **a = (int**) malloc (sizeof(int*) * 3); a[0][0] = 1; a[0][1] = 2; a[0][2] = 3; for(int i = 0; i < 3; i++) { printf("%d",...
Kamil Kug's user avatar
0 votes
0 answers
26 views

Issue Initializing variable

I hope someone can help clear this up for me. If I use this I get an error: int i = GetInt(); https://gist.github.com/anonymous/7707d2b851d40106c525#file-gistfile1-txt I get an error... but if I ...
Brian Cullen's user avatar
0 votes
1 answer
59 views

Error Message while doing Greedy for declared variable

greedy.c:8:7: note: previous definition is here int i; This variable has been declared and used and I am getting this error message. If I remove the declared variable then it tells me I didn't ...
SunDriedTomato's user avatar
0 votes
2 answers
201 views

pset1 mario Initializing for loop from GetInt

I'm running the Mario program and I have everything working except the correct count, which I can fix. The only issue I'm having is a syntactical one. I'm tying to initialize the "for loop" with the ...
Michael Suits's user avatar