nikhil.kathare
BAN USER
char temp;
j=strlen(str);
for(i=0;i<j-1;i++)
{
temp = str[i];
str[i] = str[j];
str[j] = temp;
j--;
}
Version A: The stack should be efficient when pushing an item.
push:
enqueue in queue1
pop:
while size of queue1 is bigger than 1, pipe dequeued items from queue1 into queue2
dequeue and return the last item of queue1, then switch the names of queue1 and queue2
Version B:The stack should be efficient when popping an item
push:
enqueue in queue2
enqueue all items of queue1 in queue2, then switch the names of queue1 and queue2
pop:
deqeue from queue1
Repabig8485, Apple Phone Number available 24/7 for our Customers at ABC TECH SUPPORT
Hello, I'm Abigail and I'm from Hugo City. I maintain customer loyalty and keep a diverse group of ...
Repthelmasaraht, Applications Developer at Accolite software
A child protection social worker is responsible for a variety of services designed to help families and children in a ...
Cannot dereference the void pointer in printf's
- nikhil.kathare September 18, 2013To print you have to use this way,
printf("int %d\n",*(int *)p);
Also for assinging have to assing in this format,
*(float *)p=30.5;
And then print as
printf("float %f\n",*(float *)p);
Note format specifier %f is used, %d will print wrong value.