// Passing structure to function
// function prototype
#include <stdio.h>
#include<string.h>

struct student{
    int roll;
    float cgpa;
    char name[100];   };
    
void printInfo(struct student s2);

int main() {
    struct student s2 = {1665,9.3,"Aman"};
    printInfo(s2);
    return 0;
}

void printInfo(struct student s1){
    printf("Student information : \n");
    printf("Student.roll = %d\n",s1.roll);
    printf("Student.name = %s\n",s1.name);
    printf("Student.cgpa = %f",s1.cgpa);
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: