#include<stdio.h> #include<stdlib.h> void main() { int num; // Variable marks is of Char Type char marks[3] = "98"; printf("Please Enter Marks : "); scanf("%s",marks); num = atoi(marks); printf("nMarks : %d",num); }
Output :
Please Enter Marks : 76 Marks : 76
No comments:
Post a Comment