thanks. Seems like it doesn't work on mac high sierra. Works on ubuntu
Type: Posts; User: bos1234
thanks. Seems like it doesn't work on mac high sierra. Works on ubuntu
I'm working through poker.c from King's C programming book and I need help analyzing it via gdb
He has the following:
while (cards_read < NUM_CARDS) {
bad_card = false;
...
I'm working through C programming: Modern Approach by K.N. King
justify is a program that can correctly format (spacing) any sort of text. So if you write something like "hello space space space...
where abouts is this?
Paste your full code so we can highlight the mistake for you. As mentioned above, it may be due to the fflush or the way you have declared your variables.
#include <stdio.h>
int main()
{...
another solution. Not sure which one is better? Line 10 is where the change has been made
#include <stdio.h>
int *find_largest(int a[], int n)
{
int i, *x;
x = &a[0];
for (i = 1; i <...
thank you.
New code below
#include <stdio.h>
int *find_largest(int a[], int n)
{
int i, *x;
x = &a[0];
hmmm
if I press F5 to debug and set no break points, there is no output for me. I get this warning:
I am assuming that is for the cases when a[i] < x or a[i] == x (line 10 and 16). But that...
Morning all.
question from chapter 11, qn 8 modern C programming by king
my solution
#include <stdio.h>
int *find_largest(int a[], int n)
thank you
noted.
I see that if I declare the rows and cols in the function definition for array a (i.e. have only 1 argument), then I only need to pass the name in the function main..
for example.
...
Hi,
I am having alot of trouble with the concept of multidimensional arrays and functions.
for one dimensional arrays, when calling the function, we use the function name and number of elements....
Question comes from Modern C programming by King ch 9 qn 7
http://i41.tinypic.com/rtn9f5.jpg
http://i44.tinypic.com/w22hqg.png
This is one of the larger programs I have written to date. I am...
When I trace this program line by line, I get different outputs(which is what I want). However, when I compile and run, output values are all the same. Why is this the case?
I initialised the seed...
this will solve your problem, however, not sure if its the best solution for future programs.
try this:
#include<stdio.h>
int main()
{
someone please verify my answer
ok assume I enter like this
enter gender: M
enter yos: 23
enter qua: x
Noted.
Thanks very much!
Hi
I go home for lunch for 1 hour. So I'm trying that 'nerve flossing' exercise. Can you also post some other exercises that were suggested to you.
thanks once again!
Hi,
I just recently solved a problem from a book which was difficult for me. Now, I would like to document the solution (.pdf/.docx file), so that I can refer to it in the future.
Is there some...
Hi,
I am trying to solve this problem @ work and am wondering if anyone has any experience in this area?
Scenario:
There are sites located within an area (eg. New York) called BTS sites or Base...
Hi,
I found this via google. I Just skimmed through it but it looks like a good tutorial
A Ray Tracer - Part 1 | PurpleAlienPlanet
general question:
Is there any forum such as this one dedicated to assembly language?
as asked by whiteflags & laserlight - is the input to be entered, sorted?
Not sure if I understand your question. That code seems to work fine.
#include <stdio.h>
int main()
{
float lower_rad, upper_rad, slant_h;
printf("\nEnter the lower radius: ");
In the second case, you do not need amount(int a,int b); (see link below)
You have already informed the compiler of what is to come. So, when you call the function inside main, the program knows...