Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?
No Answer is Posted For this Question
Be the First to Post Answer
How can you be sure that a program follows the ANSI C standard?
find the size of structure without using the size of function
What is the explanation for the dangling pointer in c?
what would be the output of the following program main() { int a[] = {1,2,3,4,5}; int *ptr = {a,a+1,a+2,a+3,a+4}; printf("%d %d %d %d",a,*ptr,**ptr,ptr); } }
Why does everyone say not to use scanf? What should I use instead?
what is an inline fuction??
What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?
You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?
Write a program that receives as input a number omaadel-n-print, four digits.
What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }
Which command is more efficient? *(ptr+1) or ptr[1]