Search:

Type: Posts; User: Dynesclan

Search: Search took 0.00 seconds.

  1. Replies
    4
    Views
    2,570

    Then pointers do pass by value instead of by...

    Then pointers do pass by value instead of by reference in caller?
  2. Are you saying that the [0] points to 'A', at the...

    Are you saying that the [0] points to 'A', at the start of the array? Does that mean that since 'D' is 3 characters away from 'A', the ptr would use [3]?

    For example:
    ptr = &alphabet [3];
  3. Sorry to keep you waiting for an answer....

    Sorry to keep you waiting for an answer. Honestly, I'm not sure how to set ptr to point to an individual letter in the array. At first I thought it would have to do with converting the letter to...
  4. Oops... const char alphabet [26] =...

    Oops...

    const char alphabet [26] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  5. character pointer question (should be easy, but I'm new to this)

    I have a character pointer question.

    Given a char pointer called ptr (i.e. char *ptr) and the alphabet array (const char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"), how do I make ptr point to the...
  6. Replies
    4
    Views
    2,570

    Two questions about pointers

    I have a question about pointers. What do they enable passing VARIABLES to FUNCTIONS by (ex. value, reference)?

    -------------------------------------------------------------------------------

    I...
  7. Replies
    6
    Views
    2,459

    I'm not able to run the code, but I just need to...

    I'm not able to run the code, but I just need to verify that it works in the same way strlen() does.
  8. Replies
    6
    Views
    2,459

    Here's what I thought would work: int...

    Here's what I thought would work:


    int string_length( char str[ ] )
    {
    int count = 0;

    while ( string[count] != '\0' )
    ++count;
  9. Replies
    6
    Views
    2,459

    C Code formation help

    I need the correct C code for this function string_length, to calculate the number of characters in a string and return the answer as an int (without counting the null terminator '\0').


    int...
  10. Replies
    5
    Views
    1,386

    For Loop Issue

    I've typed up this code below, but need to find Z. Do I need printf to show what z is and if so, how would I implement it?

    insert

    int n, z;

    z=1000
    for (n=0; n<100; n+=100)
    {
    z++;
  11. Replies
    1
    Views
    1,188

    Simple Translation Question/s

    I was wondering if "Less than or equal to" is symbolized as <= or <== in code and how this statement could be translated into code:

    If A is less than or equal to B and A is equal to G, then print...
Results 1 to 11 of 11