Finding a number which was log of base 2
Answer / jaganathan gnanavelu
log of base 2 means given variable is power of 2. So
void main(){
int x;
if(x&(x-1){
printf("Given Number is not log base 2\n");
}
}
| Is This Answer Correct ? | 5 Yes | 2 No |
main() { int i=5; printf(“%d”,i=++i ==6); }
void main() { printf(“sizeof (void *) = %d \n“, sizeof( void *)); printf(“sizeof (int *) = %d \n”, sizeof(int *)); printf(“sizeof (double *) = %d \n”, sizeof(double *)); printf(“sizeof(struct unknown *) = %d \n”, sizeof(struct unknown *)); }
Sir... please give some important coding questions asked by product companies..
create a login program that ask username and password. if you input username or password 3 times wrong, the program will terminate else the program will prompt a message "congratulations"
plz tell me the solution.......... in c language program guess any one number from 1 to 50 and tell that number within 8 asking question in yes or no...............
Cau u say the output....?
void main() { char a[]="12345\0"; int i=strlen(a); printf("here in 3 %d\n",++i); }
write a program in c language to get the value of arroy keys pressed and display the message which arrow key is pressed?
Write a Program that Inputs 10 Numbers in an Array and Show the Maximum Number
How we print the table of 3 using for loop in c programing?
main() { int i =10, j = 20; clrscr(); printf("%d, %d, ", j-- , --i); printf("%d, %d ", j++ , ++i); } a. 20, 10, 20, 10 b. 20, 9, 20, 10 c. 20, 9, 19, 10 d. 19, 9, 20, 10
main() { unsigned int i=10; while(i-->=0) printf("%u ",i); }