how does the C compiler interpret the following two
statements
p=p+x;
q=q+y;
a. p=p+x;
q=q+y
b. p=p+xq=q+y
c. p=p+xq;
q=q+y
d. p=p+x/q=q+y
Answers were Sorted based on User's Feedback
Are pointers integer?
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
What are void pointers in c?
Design a program using an array that lists even numbers and odd numbers separately from the 12 numbers supplied by a user.
What is the use of function overloading in C?
How do we select the big element or any other operation from array which is read dynamically. user need to give the elements only no need to mention the size.
What is huge pointer in c?
You have an int array with n elements and a structure with three int members. ie struct No { unsigned int no1; unsigned int no2; unsigned int no3; }; Point1.Lets say 1 byte in the array element is represented like this - 1st 3 bits from LSB is one number, next 2 bits are 2nd no and last 3 bits are 3rd no. Now write a function, struct No* ExtractNos(unsigned int *, int count) which extracts each byte from array and converts LSByte in the order mentioned in point1.and save it the structure no1, no2, no3. in the function struct No* ExtractNos(unsigned int *, int count), first parameter points to the base address of array and second parameter says the no of elements in the array. For example: if your array LSB is Hex F7 then result no1 = 7, no2 = 2, no3 = 7. In the same way convert all the elements from the array and save the result in array of structure.
Can you please explain the scope of static variables?
how does the C compiler interpret the following two statements p=p+x; q=q+y; a. p=p+x; q=q+y b. p=p+xq=q+y c. p=p+xq; q=q+y d. p=p+x/q=q+y
What is the use of a semicolon (;) at the end of every program statement?
What is the purpose of void in c?