Search:

Type: Posts; User: nmn

Search: Search took 0.01 seconds.

  1. great help...thanks andreas and jim

    great help...thanks andreas and jim
  2. thanks barney...but i am unfamiliar with the...

    thanks barney...but i am unfamiliar with the concept of sequence point...can u clarify it a little...thanks
  3. some issue with the precedence and decrementation

    #include<stdio.h>
    int main(){
    int a[]={10,20,30,40};
    int i=3,x;
    x=1*a[--i]+2*a[--i]+3*a[--i];
    printf("%d",x);
    return 0;
    }

    i expected it to print 100 but it prints 60 instead
  4. Replies
    10
    Views
    1,642

    ok...got it!! thanks...

    ok...got it!!
    thanks...
  5. Replies
    10
    Views
    1,642

    thanks a lot kurt !! :) though can you or...

    thanks a lot kurt !! :)
    though can you or someone provide a little explanation since n is a double-dim array and *n should denote the value at its base address
  6. Replies
    6
    Views
    1,468

    also how can you expect the function to return 3...

    also how can you expect the function to return 3 different values at the same time
  7. Replies
    6
    Views
    1,468

    this code: int ask(inventory item[], int range);...

    this code:
    int ask(inventory item[], int range);

    should be:
    int ask(struct inventory *item, int range);

    and correspondingly make changes in the function definition
  8. Replies
    10
    Views
    1,642

    this code: #include int main() {...

    this code:


    #include<stdio.h>
    int main()
    {
    int n[3][3]={{1,2,3},{4,5,6},{7,8,9}};


    printf("\n %d %d %d", *n , n[0][0], n[2][2]);
  9. Replies
    10
    Views
    1,642

    isn't *n same as n[0][0]??

    isn't *n same as n[0][0]??
  10. Thread: what is return?

    by nmn
    Replies
    17
    Views
    1,515

    i dont know what exactly you mean by typical, but...

    i dont know what exactly you mean by typical, but it is highly useful when you create functions to perform specific tasks and need a value that the function computes in another part of your program
  11. Replies
    10
    Views
    1,642

    output value not as expected @beginner

    #include<stdio.h>
    void main()
    {
    int n[3][3]={{1,2,3},{4,5,6},{7,8,9}};


    printf("\n%d %d %d", *n , n[0][0], n[2][2]);
    }
  12. Replies
    2
    Views
    1,054

    is there a condition for checking for paragraph...

    is there a condition for checking for paragraph breaks??
  13. Replies
    2
    Views
    1,054

    reading characters from a file

    if i start reading individual characters from a text file having the following content:


    "music, Indian classical dance, and other aspects of Indian
    culture.

    It is also a movement with...
  14. Replies
    6
    Views
    13,061

    the following code letters = strlen(words1);...

    the following code

    letters = strlen(words1);
    char visible_words[letters];


    will not work as you will have to allocate memory dynamically

    the following code will be correct
  15. Thread: arrays in C

    by nmn
    Replies
    11
    Views
    1,171

    allocate sufficient space for tab1[], tab2[], and...

    allocate sufficient space for tab1[], tab2[], and tab3[] in your calling function according to the values of n and m...you can pass the double-dim array to the fuction as *mat
  16. Thread: character arrays

    by nmn
    Replies
    5
    Views
    823

    char s[10]; printf("%c", s[15]); if char...

    char s[10];
    printf("%c", s[15]);

    if char s[10] represents a character array of 10 elements then why does printing s[15] give a garbage value instead of showing an error at accessing an element...
  17. Thread: character arrays

    by nmn
    Replies
    5
    Views
    823

    got it...thanks! :)

    got it...thanks! :)
  18. Thread: character arrays

    by nmn
    Replies
    5
    Views
    823

    character arrays

    i'm new to programming and would like to know whether the maximum no. of characters that an array of characters
    eg. char c[10]
    would be 10 or 11(adding the null character)
    thanks!!
Results 1 to 18 of 19