Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h> // for strcat,cpy...
- #include<stdlib.h> // for atof
- void show(int id, char* FullName, float M){
- printf("Your Name is %s", FullName);
- printf(" and your ID is %d \n",id);
- printf(" and your mark is %f \n",M);
- }
- int main(){
- char FirstName[20];
- char LastName[20];
- char FullName[40];
- unsigned char Mark[5];
- int ID;
- printf("Please Enter Your ID: ");
- scanf("%d", &ID);
- printf("please enter your first name: ");
- scanf("%s", FirstName);
- printf("Please enter your last name: ");
- scanf("%s", LastName);
- strcpy(FullName,FirstName);
- strcat(FullName," ");
- strcat(FullName,LastName);
- strcpy(Mark,"85.5");
- float M = atof(Mark);
- show(ID,FullName,M);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement