1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

i really need help!!.. please!!!!... i am desperate bout this.. thnx!!

Discussion in 'C' started by jhen10, Aug 27, 2009.

  1. jhen10

    jhen10 New Member

    Joined:
    Aug 26, 2009
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    0
    .. i am begging for a help.. somebody help me plz.. :cryin:

    - i am looking for 12 different programs.. "2 functions, 2 two-dimensional array, 2 one-dimensional array, 3 strings, and 3 pointers"..

    - these are one of our requirements to passed my course. i am desperate bout this,. i cant think of other way on how can i find some problems coz i still have 3 projs to accomplish.. this is the best way on how i can easily find what i am looking for.. the very first time ive seen this forum i know that this is the one i am looking forward coz i know u guys are helpful enough.. ur replies is very much appreciated by me,. as early as now, i am saying thanks alot.. THANK YOU SOOOO MUCH!!!... :D :happy: :shy:
     
  2. naimish

    naimish New Member

    Joined:
    Jun 29, 2009
    Messages:
    1,046
    Likes Received:
    18
    Trophy Points:
    0
    Occupation:
    Software Engineer
    Location:
    On Earth
  3. jhen10

    jhen10 New Member

    Joined:
    Aug 26, 2009
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    0
    am so sorry..u_u
     
  4. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    It's a pretty vague question; could you elaborate please?
    What did they ask for exactly? (Hint: use copy and paste)
    What programming language are you using?
    What operating system and compiler/assembler/interpreter (including author and versions of both)?
    What does "i still have 3 projs to accomplish" mean: have you already written 9 of the 12 programs?
     
  5. jhen10

    jhen10 New Member

    Joined:
    Aug 26, 2009
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    0
    ohh im sorry..

    - the only instruction given to us is we just need to look for a program:
    2 functions, 2 two-dimensional array, 2 one-dimensional arrray, 3 strings, 3 pointers..
    ~ sample program for strings:
    Code:
    	#include <stdio.h>
    	#include <string.h>
    	main()
    	{
    	  char str1[10], str2[10];
    	  int length;
    	  strcpy(str1, “C Programming”);
    	  length = strlen(str1);
    	  strcpy(str2, str1);
    	  printf(“\n %s”, str2);
    	  strlwr(str1);
    	  puts(str1);
    	  printf(“\n %d”, length);
    	getch();
    }
    
    ~ sample program for pointers:
    Code:
    main()
    {
         		 int i=3, *x;
         		 float j = 1.5, *y;
         	 	char k = 'c', *z;
          
         		printf ("Value of i = %d\n", i);
        		printf ("Value of j = %.2f\n", j);
         		printf ("Value of k = %c\n\n", k);
         
         		x = &i;
        		y = &j;
         		z = &k;
         
         		printf("Original value in x = %d\n", x);
         		printf("Original value in y = %d\n", y);
         		printf("Original value in z = %d\n\n", z);
         
         		x++;
         		y++;
         		z++;
         
         		printf("New value in x = %d\n", x);
         		printf("New value in y = %d\n", y);
         		printf("New value in z = %d\n", z);
         
    getch();
    return (0);
    }
    - my os is windows vista, turbo c, version 3.0

    - nope.. i min,, i have other things to accomplish.. 3 mins in another subject.. not the program..

    - thanks alot..
     
    Last edited by a moderator: Aug 27, 2009
  6. c_user

    c_user New Member

    Joined:
    Aug 23, 2009
    Messages:
    86
    Likes Received:
    8
    Trophy Points:
    0
    Occupation:
    Php dev
    Location:
    Bhubaneswar
    programs for function
    Code:
    #include<iostream.h>
    #include<constream.h>
    void main()
    {
    int input();
    void display(int=input);
    display(20);
    display();
    }
    void display(int j)
    {
    printf("\n integer is:%d",j;
    }
    input()
    {
    int k;
    printf("\n enter an integer");
    scanf(&k);
    return k;
    }
    this is just a low level program.. if u want a bit more difficult program tell me...
    hav a gud day
     
  7. jhen10

    jhen10 New Member

    Joined:
    Aug 26, 2009
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    0
    were not yet using iostream..

    #inlcude <stdio.h>
    #include <conio.h>
    #include <string.h>

    these are the only functions we need to apply..

    - more simple much better.. tnx alot..
     
  8. jhen10

    jhen10 New Member

    Joined:
    Aug 26, 2009
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    0
  9. c_user

    c_user New Member

    Joined:
    Aug 23, 2009
    Messages:
    86
    Likes Received:
    8
    Trophy Points:
    0
    Occupation:
    Php dev
    Location:
    Bhubaneswar
    here check this out for the pointer problem...
    Code:
    #include<stdio.h>
    #include<iostream.h>
    void main()
    {
    int *p;
    int x=10;
    p=&x;
    clrscr();
    printf("\n x=%d  &x=%u \t",x,p);
    printf("\n x=%d  &x=%u \t",*p,p);
    }
    hav a gud day..
     
  10. c_user

    c_user New Member

    Joined:
    Aug 23, 2009
    Messages:
    86
    Likes Received:
    8
    Trophy Points:
    0
    Occupation:
    Php dev
    Location:
    Bhubaneswar

Share This Page