Search:

Type: Posts; User: jack999

Search: Search took 0.00 seconds.

  1. Replies
    8
    Views
    1,434

    Recursive Functions

    Show the exact screen-output of each of the following programs



    #include<stdio.h>
    void rev( ) //function
    {
    char ch;
    scanf("%c", &ch); //reads what you entered in main
    if (ch <...
  2. Replies
    5
    Views
    1,683

    1. f(6) = f(5) + f(4) 2. f(5) = f(4) + f(3) 3....

    1. f(6) = f(5) + f(4)
    2. f(5) = f(4) + f(3)
    3. f(4) = f(3) + f(2)
    4. f(3) = f(2) + f(1)
    5. f(2) = 3
    6. f(1) = 1


    i got it
    thanks ;)
  3. Replies
    5
    Views
    1,683

    f(6) = f(5) + f(4)...

    f(6) =
    f(5) + f(4) =
    f(4) + f(3) + f(3) + f(2) =
    f(3) + f(2) + f(2) + f(1) + f(2) + f(1) + 3 =
    f(2) + f(1) + 3 + 3 + 1 ...
  4. Replies
    5
    Views
    1,683

    Question about Recursive Functions

    Show the exact screen-output of each of the following programs:

    c)


    #include <stdio.h>
    int f (int a)
    {
    if (a== 1)
    return 1;
  5. Thread: 1-D array

    by jack999
    Replies
    24
    Views
    10,520

    thank u Salem

    thank u
    Salem
  6. Thread: 1-D array

    by jack999
    Replies
    24
    Views
    10,520

    i think i wont be able to submet it to the prof.

    i think i wont be able to submet it to the prof.
  7. Thread: 1-D array

    by jack999
    Replies
    24
    Views
    10,520

    guys i really got confused when u tryed yo solve...

    guys i really got confused when u tryed yo solve iy with functions


    #include<stdio.h>
    void read(float arr[],int n)
    {
    int i ;

    for (i=0 ; i<n ; ++i)
    {
  8. Thread: 1-D array

    by jack999
    Replies
    24
    Views
    10,520

    yes i correct it and it worked thanks

    yes i correct it and it worked

    thanks
  9. Thread: 1-D array

    by jack999
    Replies
    24
    Views
    10,520

    i solved it but the problem is that the first...

    i solved it but the problem is that the first element of new array is always 0

    #include<stdio.h>
    main( )
    {
    int i,n,j ;
    float arr[5], arr_new[5] ;
    int temp;
  10. Thread: 1-D array

    by jack999
    Replies
    24
    Views
    10,520

    in question he says (The swap operation should be...

    in question he says (The swap operation should be done on one array)

    if i used





    for(int i = 0; i < N; i++)
    i_new_array[i] = i_old_array[N-i]
  11. Thread: 1-D array

    by jack999
    Replies
    24
    Views
    10,520

    i didnt undestand`anything :D

    i didnt undestand`anything :D
  12. Thread: 1-D array

    by jack999
    Replies
    24
    Views
    10,520

    SlyMaelstrom i didnot get it can u explain...

    SlyMaelstrom

    i didnot get it
    can u explain more
  13. Thread: 1-D array

    by jack999
    Replies
    24
    Views
    10,520

    1-D array

    Write a C-Program that swaps the elements of 1-D array (10 elements) :
    Example:
    If the given array is:
    5 8 9 2 3 1 11 17 43 6
    The new array will be:
    6 43 17 11 1 3 2 9 8 5
    Your program should...
  14. Replies
    8
    Views
    2,089

    it worked thanks Dave_Sinkula and thanks...

    it worked
    thanks Dave_Sinkula

    and thanks guys for correction
  15. Replies
    8
    Views
    2,089

    in 'for' loop, I don't believe that 'num' get set...

    in 'for' loop, I don't believe that 'num' get set to EOF
    because when i run the progrmme it doesnot stop
  16. Replies
    8
    Views
    2,089

    hELP:Data Files

    there is a problm in this programme
    but i dont know what is it


    question
    Write a C-Program that does the following
    • Read integer numbers from a file inp.dat
    • Calculate the sum, average, and...
Results 1 to 16 of 16