#include<stdio.h> #include<conio.h> struct student { int name[25],fathername[25]; int rollnumber; void showstudent() { printf("The Student name is %s"); printf("The student's father is %s); printf("His roll number is %d"); } }s; /* s is a single element of the structure student */
void main() { printf("enter the name,fathername,rollnumber "); gets(s.name); gets(s.fathername); scanf("%d",&s.rollnumber); s.showstudent(); getch(); } /*Here in the above example void showstudent is a function which is inside the structure student.*/
void main() { float a= 0.7; if (a < 0.7) printf("c"); else printf("c++"); } Output of the above program is c. Why? Whereas the same program with 0.8 instead of 0.7 gives c++ as the output? Why explain?