Posts

Showing posts from August, 2011

Sizeof operator again

char * p = "Hello World" ; int a ; char b ; printf ( "%d\n" , sizeof ( p ++)); printf ( "%c\n" ,* p ); printf ( "%d" , sizeof ( a , b )); printf ( "%d" , sizeof ( b , a ));   Explain why p didn't get incremented and  what is the use of comma operator here.

[Adobe]Job scheduling problem

You are given N jobs with their start and end time mentioned.These jobs may have their timings overlapped.You have to suggest an algorithm such that maximum number of jobs can be performed in that given time interval.