User Profile

Collapse

Profile Sidebar

Collapse
nozone
nozone
Last Activity: Nov 4 '06, 06:47 PM
Joined: Oct 18 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • nozone
    replied to Regarding scanf and fgets
    in C
    I apologized that I did not show the inputs. The inputs are:

    Add
    the
    Sam
    key

    Thanks
    See more | Go to post

    Leave a comment:


  • nozone
    started a topic Regarding scanf and fgets
    in C

    Regarding scanf and fgets

    Hi. The following is my code of an example:
    #include <stdio.h> /*line 1*/
    main() /*line 2*/
    {char *command = (char *)calloc(10, sizeof(char)); /*line 3*/
    char *middle = (char *)calloc(10, sizeof(char)); /*line 4*/
    char *name = (char *)calloc(20, sizeof(char)); ...
    See more | Go to post

  • nozone
    started a topic Question regarding scanf
    in C

    Question regarding scanf

    Hi all. I am beginner in C. My question is: What is " \n" inside scanf()?

    Here is part of the implementation of an example:
    ...
    char myChar;
    int myID;
    scanf("%c", &myChar);
    scanf("%d\n"; &myID);
    printf("Option: %c, ID: %d\n", myChar, ID);
    ...
    The reason that I break scanf() into 2 parts is that I need to take either one argument...
    See more | Go to post

  • nozone
    started a topic How to create pointer array by memory allocation?
    in C

    How to create pointer array by memory allocation?

    Hi. I am new to the C language. I need to store the commands from input to a pointer array without any "[]"declaratio n. How to create an pointer array by memory allocation? I tried to use the following statement, but it did not work.

    static char **choice = (char **)calloc(NUMBE R_COMMAND,sizeo f(char **));

    I want to declare this array as private and use by all functions, so I use "static".
    T...
    See more | Go to post
No activity results to display
Show More
Working...