convert into C LANGUAGE PROGRAM
#include int main() {unsigned char data2[]=" ";printf("type any word: ");scanf("%s",&data2);shuffle(data2, 10);printf("\nNew Word: ");viewDeck(data2, 10);return 0;}void viewDeck(const char deck[], int size){int i;for(i = 0;i<>printf("%c",deck[i]);}printf(" ");}void shuffle(char deck[], int size){int n1, n2, i;srand((unsigned)time(NULL));for(i = 0;i<>n1 = rand() % size;n2 = rand() % size;char ch = deck[n1];deck[n1] = deck[n2];deck[n2] = ch;}}
int main() {unsigned char data2[]=" ";printf("type any word: ");scanf("%s",&data2);shuffle(data2, 10);printf("\nNew Word: ");viewDeck(data2, 10);return 0;}void viewDeck(const char deck[], int size){int i;for(i = 0;i<>printf("%c",deck[i]);}printf(" ");}void shuffle(char deck[], int size){int n1, n2, i;srand((unsigned)time(NULL));for(i = 0;i<>n1 = rand() % size;n2 = rand() % size;char ch = deck[n1];deck[n1] = deck[n2];deck[n2] = ch;}}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here