Tutor profile: Nilay A.
Subject: Physics (Waves and Optics)
Using diffraction seems to be a useful technique for measuring size of small object. Is there a lower limit for size of objects that can be measured this way?
We know that: $$ \sin(\theta) = m\lambda/a $$ Since $$ \sin(\theta) \leq 1 \implies \lambda \leq a $$ So you cant measure the size of the object shorter than the wavelength of the light.
Subject: Python Programming
What will be output of following program ? b = [2,5,6,7,8,9,10,23,15] b[::2] = 11,22,33,44,55,66 print(b)
It will give ValueError since we are attempting to assign sequence of size 6 go extended slice of size 5.
Subject: C Programming
What is Dangling Pointer?
Dangling Pointer is a pointer that doesn't point to a valid memory location. They arise when an object is deleted or de-allocated, without modifying the value to the pointer, so that the pointer still points to the memory location of the deallocated memory. Following is an example: int *ptr = (int *)malloc(sizeof(int)) free(ptr) In this example "ptr" becomes a dangling pointer after freeing it and any operation on "ptr" now like *(value of) or &(address of) becomes invalid.
needs and Nilay will reply soon.