No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
[code=c] #include<stdio.h> #include<conio.h> typedef struct { int rno; char name[10]; float marks; }stu; stu stu3; void getf(stu * stutmp); void show(stu * stutmp); void main() { clrscr(); getf(&stu3); show(&stu3); getch(); } void getf(stu *stutmp) { scanf(" %d",&stutmp->rno); printf("%d\n",stutmp->rno); scanf(" %s",stutmp->name); printf("%s\n",stutmp->name); scanf(" %f",&stutmp->marks); printf("%f\n",stutmp->marks); getch(); } void show(stu * stutmp) … |
|
[code=cplusplus] #include<iostream.h> #include<stdlib.h> int main(void) { char a,q; cout<<"Enter a char\n"; cin>>a; q=a; cout<<atoi(&a)<<","; cout<<atoi(&q); return 0; } [/code] ************************************* output for this code for input of (2 ,3,5): 2,22 3,33 5,55 **************************************... I think answers should be: 2,2 3,3 5,5 |