i think u can make a pc wake up from shutdown by wake on lan it allows pc in network to open each other
Type: Posts; User: elwad
i think u can make a pc wake up from shutdown by wake on lan it allows pc in network to open each other
you can also use strcmp
yes your right it makes sense aswell
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 ..
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)
{
...
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
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...
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 ?
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
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 = ?
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...
like for example here
else /* subsequent structures */
prev->next = current;//wont that be same next ???
current->next = NULL;//wont that be same...
but how prev set to current why not do it on current directly ?
i think i got since each time i m allocating memory each next points to the structure which comes after right ?
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...
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 ?
nice work mate
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>
...
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
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
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...
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...
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
your just passing address and by passing addresses its like using orginal address coz remeber an array of char is just ptrs of characters ..
as for var names i not that great in doing names :P