print a line with c programming Get link Facebook X Pinterest Email Other Apps March 12, 2021 #include<stdio.h>int main(){ printf("Hellol I am Learning C with nilabhru"); return 0;} Get link Facebook X Pinterest Email Other Apps Comments
create a num table in a new file in c May 06, 2021 #include<stdio.h> int main() { FILE *ptr; int num; printf("Enter the integer which table you need of\n"); scanf("%d",&num); ptr = fopen("table.txt","w"); for(int i=0 ; i<10 ; i++){ fprintf(ptr,"%d*%d=%d\n",num,i+1,num*(i+1)); } fclose(ptr); return 0; } Read more
write a programme to compare time stamp in c April 28, 2021 #include<stdio.h> #include<string.h> typedef struct time_stamp{ int year; int month; int date; int hour; int minute; int seacond; }time_stamp; void display(time_stamp dt1,time_stamp dt2){ printf("the time stamp is: %d/%d/%d-%d:%d:%d\n",dt1.year,dt1.month,dt1.date,dt1.hour,dt1.minute,dt1.seacond); //} //void display(time_stamp dt2){ printf("the time stamp is: %d/%d/%d-%d:%d:%d\n",dt2.year,dt2.month,dt2.date,dt2.hour,dt2.minute,dt2.seacond); } int time_stampcmp(time_stamp dt1,time_stamp dt2){ if(dt1.hour>dt2.hour){ return 1; } if(dt1.hour<dt2.hour){ return -1; } if(dt1.minute>dt2.minute){ return 1; } if(dt1.minute<dt2.minute){ return -1; } if(dt1.seacond>dt2.seacond){ return 1; } if(dt1.seacond<dt2.seacond){ return -1; } if(dt1.year>dt2.year){ return 1; } if(dt1.year<dt2.year){ return -1; } if(dt1.month>dt2.month){ return 1; } if(d... Read more
write a struct programme to keep bank details in c April 28, 2021 #include<stdio.h> #include<string.h> struct customer{ int account_num; int IFSE_code; float Balance; char name[10]; }; int main() { struct customer n1 = {6066,58741,9854123,"nilabhru"}; printf("%d\n",n1.account_num); printf("%d\n",n1.IFSE_code); printf("%0.3f\n",n1.Balance); printf("%s\n",n1.name); return 0; } Read more
Comments
Post a Comment