Search:

Type: Posts; User: elwad

Page 1 of 8 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    5,616

    i think u can make a pc wake up from shutdown by...

    i think u can make a pc wake up from shutdown by wake on lan it allows pc in network to open each other
  2. you can also use strcmp

    you can also use strcmp
  3. Thread: something weird

    by elwad
    Replies
    12
    Views
    1,190

    yes your right it makes sense aswell

    yes your right it makes sense aswell
  4. Thread: something weird

    by elwad
    Replies
    12
    Views
    1,190

    yah i know thats easy :P but i was just curious...

    yah i know thats easy :P but i was just curious abt initializing in the middle when i added (b=x) in braces it made it work ..
  5. Thread: something weird

    by elwad
    Replies
    12
    Views
    1,190

    oke here i got it i think when i puted braces...

    oke here i got it i think when i puted braces around b=x i think it doesnt makes it get discarded and gets initialized to x then after that test is made


    #include <stdio.h>
    int main(void)
    {
    ...
  6. Thread: something weird

    by elwad
    Replies
    12
    Views
    1,190

    i think that wont work since it will evalute to...

    i think that wont work since it will evalute to false and wont run the loop i tried it and it didn't run the loop
  7. Thread: something weird

    by elwad
    Replies
    12
    Views
    1,190

    something weird

    hello today i was trying something with linked list to initialize a var in the 2nd field of the for loop using the , operator but i got into a forever loop i want to know if this is defined behaviour...
  8. Replies
    19
    Views
    2,685

    so basically here first time loop runs perv gets...

    so basically here first time loop runs perv gets assigned to current then after that on 2nd time when loops runs it sets perv->next which sets perv->next to previous next of current right ?
  9. Replies
    19
    Views
    2,685

    yes yes i c i understand it now i just didnt...

    yes yes i c i understand it now i just didnt concentrate well on the test lol
    on first time it wont enter the tests but the perv will keep track by setting perv to current i feel so stupid lol
  10. Replies
    19
    Views
    2,685

    k ic but when memory is allocated now wouldnt at...

    k ic but when memory is allocated now wouldnt at end of the loop prev=current; and remove the else and code would work aswell ? since we assigned ptrs then all stuff inside are = ?
  11. Replies
    19
    Views
    2,685

    i know thats logical but whats puzzling me is we...

    i know thats logical but whats puzzling me is we now allocating memory right in this loop iteration so when we allocate by malloc that memory gets passed to both prev and current i tried to remove...
  12. Replies
    19
    Views
    2,685

    like for example here else ...

    like for example here
    else /* subsequent structures */

    prev->next = current;//wont that be same next ???

    current->next = NULL;//wont that be same...
  13. Replies
    19
    Views
    2,685

    but how prev set to current why not do it on...

    but how prev set to current why not do it on current directly ?
  14. Replies
    19
    Views
    2,685

    i think i got since each time i m allocating...

    i think i got since each time i m allocating memory each next points to the structure which comes after right ?
  15. Replies
    19
    Views
    2,685

    there something also i m puzzled abt in this each...

    there something also i m puzzled abt in this each structure itself we dont increment address so how does it point to the next structure like for example
    int arr[]={1,2,3};
    int *ptr=*arr+1; will...
  16. Replies
    19
    Views
    2,685

    k i somehow got it but why if i free them once...

    k i somehow got it but why if i free them once can cause problems ? like it needs some delay in the loop ? for example use Sleep func of windows api ?
  17. Replies
    37
    Views
    20,778

    nice work mate

    nice work mate
  18. Replies
    19
    Views
    2,685

    Dont understand something in linked list

    oke i don't understand something in code where i was reading abt linked list i dont understand something in the code


    /* films2.c -- using a linked list of structures */

    #include <stdio.h>
    ...
  19. Replies
    14
    Views
    2,539

    also if its very big memory though and its bigger...

    also if its very big memory though and its bigger than what you expect you can just declare the variable for holding on the heap and allocate it and if its more then realloc and free in the end
  20. Replies
    34
    Views
    3,776

    why dont you use getchar to read them inside a...

    why dont you use getchar to read them inside a while then test inside the while better than retesting inside the loop will save you less time
  21. Thread: K&R example

    by elwad
    Replies
    14
    Views
    1,873

    acctually you can display it in pointer notation...

    acctually you can display it in pointer notation aswell but its complex you can do anything with index that can ptr notation do but easier way


    #include <stdio.h>
    int main(void)
    {
    int...
  22. Thread: Do/While Loops

    by elwad
    Replies
    6
    Views
    1,807

    you can after each scanf add a function which...

    you can after each scanf add a function which eats line for example
    while(getchar()!='\n')
    continue;
    will skip every thing after scanf like for example you type more than a answer
    like NOOO...
  23. Replies
    3
    Views
    999

    it isnt initialized to point to any address so it...

    it isnt initialized to point to any address so it will crash btw why arent you using indexing to multiplay values since your loop goes by index not by address you should just arr[i]*=3
  24. Thread: K&R example

    by elwad
    Replies
    14
    Views
    1,873

    your just passing address and by passing...

    your just passing address and by passing addresses its like using orginal address coz remeber an array of char is just ptrs of characters ..
  25. Replies
    3
    Views
    1,195

    as for var names i not that great in doing names...

    as for var names i not that great in doing names :P
Results 1 to 25 of 188
Page 1 of 8 1 2 3 4