有一個集合由A-Z這26個字母組成,打印這個集合的所有子集,每個子集一行,寫C代碼實現,不能使用遞歸

//1、 //str爲A~Z的字母集合,n爲需要處理的前n個字符集合,本題n爲26,n是爲了方便測試 #include<stdio.h> void SubSet(int n) { const char *str = 「ABCDEFGHIJKLMNOPQRSTUVWXYZ」; int maxnum = 1<<n; //2^n for(int i=0;i<maxnum;i++)//處理0到2^n -1
相關文章
相關標籤/搜索