Change c++ into c
Can someone change this code in c++ into c code? // CPP program to print diagonal star patterns #include <iostream> using namespace std;   void pattern(int n) {     // Loop denoting rows     for (int i = 0; i < n; i++) {                   // Loop denoting columns         for (int j = 0; j < n; j++) {                           // Checking boundary conditions and main             // diagonal and secondary diagonal conditions             if (i == 0 || j == 0 || i == j || i == n - 1                             || j == n - 1 || i + j == n - 1)                 cout << "*";             else                 cout << " ";         }         cout << endl;     } }   // Driver code int main() {     // n denotes size which should be odd     int n = 7;     // Function calling     pattern(n);     return 0; }