Search:

Type: Posts; User: vandrea

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    1,719

    It seems scanf is getting called first ..could...

    It seems scanf is getting called first ..could you post the whole code.. I mean your main function and when you are calling writemenu() function as well! .
  2. Replies
    6
    Views
    1,304

    Thanks a lot Ben that made things clear:)

    Thanks a lot Ben that made things clear:)
  3. Replies
    6
    Views
    1,304

    Thanks Ben for your reply. Yes I got what you...

    Thanks Ben for your reply. Yes I got what you said !

    But have certain things still on my mind still. Sorry abt that though!

    So if a do a string comparision on both of these character arrays, ...
  4. Replies
    6
    Views
    1,304

    What in case I have an array name different for...

    What in case I have an array name different for the second one I mean say,


    char arr1_ca[0]='Y';
    char arr1_ca[1]='E';
    char arr1_ca[2]='S';

    However the first remains the same thats
  5. Replies
    6
    Views
    1,304

    Basic question on character array

    hi there,

    Is there any difference between these two kind of storage of characters in C




    char array_ca[10]={"YES"};

    OR
  6. Replies
    12
    Views
    2,109

    I guess you would require to do a memset on both...

    I guess you would require to do a memset on both of these character arrays before you actually use it...Can you just give it a try?
  7. Replies
    7
    Views
    1,260

    quzah i did not get your point. isnt 5 sufficient...

    quzah i did not get your point. isnt 5 sufficient since we would store only exit and a null character at the end , i thought it would be enough?
  8. Replies
    7
    Views
    1,260

    As tabstop said probably u could use strncmp....

    As tabstop said probably u could use strncmp. Follg is the code thou a littl longer I guess


    char exit_ca[5];
    memset(exit_ca, 0x00, 5);
    strncpy(exit_ca, "exit", 5);

    if(ZERO == strncmp(buff,...
  9. Replies
    2
    Views
    1,205

    Ya thats right. I have now corrected it. Thanks.

    Ya thats right. I have now corrected it. Thanks.
  10. Replies
    22
    Views
    2,138

    Well fiendslyr this is a pretty stright forward...

    Well fiendslyr this is a pretty stright forward question.

    >> After you are done either your printf probably you could ask the user for his input - Choice of operation (Done thru scanf function)...
  11. Replies
    2
    Views
    1,205

    Doubt on scanf function

    Hi,

    I have a query wrt character array. Follg is the basic code



    void main()
    {
    char a[10];
    for(i=0;i<10;i++)
  12. Replies
    5
    Views
    11,304

    got it now...thks elysia

    got it now...thks elysia
  13. Replies
    5
    Views
    11,304

    considering the fact that abc_ca is filled with...

    considering the fact that abc_ca is filled with some data for first 10 characters say "ABCDEFGHIJ"
  14. Replies
    5
    Views
    11,304

    thks for quick reply Elysia!! Just to get my...

    thks for quick reply Elysia!!

    Just to get my understanding right i have an eg here...




    char abc_ca[10];
    char def_ca[15];
  15. Replies
    5
    Views
    11,304

    Quick question on sprintf and memcpy

    Hello ppl,,

    I would like to know the basic diff between sprintf and memcpy tho i know the syntax of each of these functions....I am interested on functional behaviour of both of these,,,thks in...
  16. Thread: Help!

    by vandrea
    Replies
    4
    Views
    957

    as tabstop said usage of scanf stmt on line 12 is...

    as tabstop said usage of scanf stmt on line 12 is wrong when it should have been scanf("%d", &i) instead of scanf("&d", &i) !!
  17. Replies
    10
    Views
    3,285

    Thanks guys!

    Thanks guys!
  18. Replies
    10
    Views
    3,285

    Thanks bithub for ur reply .. I did...

    Thanks bithub for ur reply ..



    I did intend to use memcpy to know its behaviour while copying the data . But how is the random value coming since I would have done memset earlier and all the...
  19. Replies
    10
    Views
    3,285

    Sorry this should have been memcpy on line no 4...

    Sorry this should have been memcpy on line no 4 i.e.

    memcpy(arr_ca, "Checking the text", ARR_LEN); instead of memset

    I am assigning the character array with sum value!!
    I have used memcpy in...
  20. Replies
    10
    Views
    3,285

    I get 101

    I get 101
  21. Replies
    10
    Views
    3,285

    Issue with memcpy

    Hi guys,

    I had an issue wrt memcpy in my code...Pls find the snippet of code below




    #define ARR_LEN 100

    char arr_ca[ARR_LEN + 1 ];
  22. Thread: 0x00 in C

    by vandrea
    Replies
    8
    Views
    19,733

    Thanks Sebastiani...Now I get it!

    Thanks Sebastiani...Now I get it!
  23. Thread: 0x00 in C

    by vandrea
    Replies
    8
    Views
    19,733

    I understood ur example but still wondering as to...

    I understood ur example but still wondering as to y cant we use sizeof in the above memset since
    sizeof(abc_ca) wuld return 3 I guess..
  24. Thread: 0x00 in C

    by vandrea
    Replies
    8
    Views
    19,733

    Thanks Sebastiani for the quick reply...but dint...

    Thanks Sebastiani for the quick reply...but dint get as to why cant we use sizeof in memset ?
  25. Thread: 0x00 in C

    by vandrea
    Replies
    8
    Views
    19,733

    yep u were right..i meant of the integral...

    yep u were right..i meant of the integral constant!

    Consider the follg eg:


    char abc_ca[3];
    memset(abc_ca,0x00,size(abc_ca));


    So after the above memset i would have following values in...
Results 1 to 25 of 26
Page 1 of 2 1 2