CODE X NOOB :
-> Product of two Same order Matrices :
This code calculates the product of two matrices entered by the user. It uses the standard libraries `stdio.h`, `stdlib.h`, and `string.h`. After clearing the screen, it prompts the user to enter the number of rows and columns for the matrices. It then declares three matrices: `a`, `b`, and `product`. The code proceeds to prompt the user to enter the elements of the first and second matrices. Next, it computes the product of the matrices using nested loops and stores the result in the `product` matrix. Finally, it prints the resulting matrix.
-> Lexicographical Order :
This code is a C program that sorts a given number of strings in lexicographical order. It begins by asking the user to enter the number of strings. Then, it prompts the user to input each string one by one. After obtaining all the strings, it uses nested loops and the `strcmp` function to compare and sort the strings in lexicographical order. Finally, it prints the sorted strings to the console. The code utilizes the standard libraries `stdio.h`, `stdlib.h`, and `string.h` for input/output operations, memory allocation, and string manipulation, respectively.
Comments
Post a Comment