Thread: newbie in need of help

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    12

    newbie in need of help

    ok so who can tell me what is wrong with these 4 sections of code? i have no idea. these are parts of code from seperate programs.

    thanx


    Code:
    int sum (int p, int q)
       {
       int result;
       result=p+q;
       }
    Code:
    int c[10]
    int i;
    for(i=o; i<=10; i++)
    c[i]=0
    Code:
    int *ptrl;
    int number=5;
    ptrl=number;
    printf("the value pointed by ptrl is %d\n", *ptrl);
    Code:
    switch (code)
       {
       case 1:
          printf("the number is 4\n");
       case 2:
          printf("the number is 8\n");
          break;
       default:
          printf("the number is not for or 8\n");
          break:
       }
    Last edited by idiotprogrammer; 06-13-2003 at 08:49 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. getting to grips with allegro and ms vc++ (newbie)
    By jimjamjahaa in forum C++ Programming
    Replies: 4
    Last Post: 11-18-2005, 07:49 PM
  2. Newbie in problem with looping
    By nrain in forum C Programming
    Replies: 6
    Last Post: 11-05-2005, 12:53 PM
  3. Newbie Programmer
    By Extropian in forum C++ Programming
    Replies: 3
    Last Post: 05-18-2004, 01:17 PM
  4. Some help for a newbie?
    By Ilmater in forum C++ Programming
    Replies: 23
    Last Post: 04-19-2004, 07:44 PM
  5. Newbie Game Develpoers Unite!
    By Telenosis in forum Game Programming
    Replies: 10
    Last Post: 06-22-2002, 02:02 PM