Some interesting codes
Program2.c : Code in C for finding whether the givennumber is multile of 2 aur not, without using any loop
Program3.c : Code in C for finding the next nearest multiple of 8 of a given number, without using any loop.
Program4.c : Code in C Asked in entrance of a Phd. Question is as follows:
Suppose we consider a random alphabetic string to represent acircular sequence.The circular sequence can be
represented by many possible strings,depending on which position is taken as the start.For example, CTCC,
TCCC, CCCT, CCTC are all strings that correspond to the samecircular sequence.Given a random string, output
the (lexicographically) smallest string that represents the same circular sequence.(In the above example,
CCCT.)First line will contain the number of test cases followed by the test cases separated by newline.The
output should contain the corresponding output separated by newline.
In this question arrays are used, you can use pointers too.
Program5.c: Code in C Write a program to find the position of without loop
For E.g position of MSB for integer 8 is 4
1000
similarly for 16 it is 5
10000