Language Ccpp Cref Problems Bits.c

#include <stdio.h>
#include <stdlib.h>
main ()
 {
 long int i=1,j=i;
					/* title			*/
 puts("Bits\tRange");
 puts("----\t-----");
					/* O/P data and calc the next 
					 * set of values		*/
 for (i=1; i<=32; i++)
 {
 printf("%2ld\t0-%12lu\n", i, j*=2);
 }
 }
/************************************************************************
 * Bits Range
 * ---- -----
 * 1 0- 1
 * 2 0- 3
 * 3 0- 7
 * 4 0- 15
 * 5 0- 31
 * 6 0- 63
 * 7 0- 127
 * 8 0- 255
 * 9 0- 511
 * 10 0- 1023
 * 11 0- 2047
 * 12 0- 4095
 * 13 0- 8191
 * 14 0- 16383
 * 15 0- 32767
 * 16 0- 65535
 * 17 0- 131071
 * 18 0- 262143
 * 19 0- 524287
 * 20 0- 1048575
 * 21 0- 2097151
 * 22 0- 4194303
 * 23 0- 8388607
 * 24 0- 16777215
 * 25 0- 33554431
 * 26 0- 67108863
 * 27 0- 134217727
 * 28 0- 268435455
 * 29 0- 536870911
 * 30 0- 1073741823
 * 31 0- 2147483647
 * 32 0- 4294967295
 */

file: /Techref/language/ccpp/cref/PROBLEMS/bits.c, 1KB, , updated: 1997年4月21日 09:53, local time: 2025年9月5日 11:45,
40.74.122.252:LOG IN

©2025 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://techref.massmind.org/techref/language/ccpp/cref/PROBLEMS/bits.c"> language ccpp cref PROBLEMS bits</A>

Did you find what you needed?

Welcome to massmind.org!

Welcome to techref.massmind.org!

.

AltStyle によって変換されたページ (->オリジナル) /