-
M.Nathira Parveen started the topic How to dynamically allocate a 2D array in C? in the forum C Programming 2 years, 5 months ago
#include <stdio.h>
const int M = 3;
const int N = 3;
void print(int arr[M][N])
{
int i, j;
for (i = 0; i < M; i++)
for (j = 0; j < N; j++)
printf(“%d “, arr[i][j]);
}
int main()
{
int arr[][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
print(arr);
return 0;
} -
M.Nathira Parveen started the topic C program to print ASCII value of a character in the forum C Programming 2 years, 5 months ago
// C program to print
// ASCII Value of Character
#include <stdio.h>
// Driver code
int main()
{
char c = ‘k’;
// %d displays the integer value of
// a character
// %c displays the actual character
printf(“The ASCII value of %c is %d”,
c, c);
return 0;
} -
M.Nathira Parveen wrote a new item 2 years, 5 months ago
http://c programming
