keyword: char

This is a discussion on keyword: char within the C Programming forums, part of the General Programming Boards category; if i use char would it be "%c" in scanf (or what?)...

  1. #1
    Registered User
    Join Date
    Jul 2002
    Posts
    48

    keyword: char

    if i use char would it be "%c" in scanf (or what?)

  2. #2
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765
    > "%c"
    Yes. (possibly)

    %d = integers
    %s = string
    etc
    The world is waiting. I must leave you now.

  3. #3
    Green Member Cshot's Avatar
    Join Date
    Jun 2002
    Posts
    892
    Yes, like this:

    char c;
    printf("Enter a character: ");
    scanf("%c", &c);

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Code review
    By Elysia in forum C++ Programming
    Replies: 71
    Last Post: 05-13-2008, 09:42 PM
  2. Sorting Linked Lists
    By DKING89 in forum C Programming
    Replies: 6
    Last Post: 04-09-2008, 07:36 AM
  3. Conversion Char To Char * Problem
    By ltanusaputra in forum Windows Programming
    Replies: 3
    Last Post: 03-01-2008, 01:06 PM
  4. newbie needs help with code
    By compudude86 in forum C Programming
    Replies: 6
    Last Post: 07-23-2006, 08:54 PM
  5. Searching a linked list for char
    By spentdome in forum C Programming
    Replies: 3
    Last Post: 05-22-2002, 11:11 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21