ComE 211 '08-'09
Main | Registration | Login Welcome Guest | RSS
[ New messages · Members · Forum rules · Search · RSS ]
  • Page 1 of 1
  • 1
ComE 211 Forum » Members and Groups Section » School Bulletin » ANSWERS ASSIGNMENT HERE (assingment on arrays)
ANSWERS ASSIGNMENT HERE
kerwinjorbinaDate: Thursday, 2008-09-04, 9:17 PM | Message # 1
Admin
Group: Administrator
Posts: 3
Status: Offline
what is the explanation of this program?

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

main()
{
char *s;
int t;
clrscr();

s=malloc(80);
if(!s)
{
printf("Memory request failed\n");
return 1;
}
gets(s);
for(t=strlen(s)-1; t>=0; t--);
printf("%c", s[t]);
free(s);
return 0;
}

 
NeverFallDate: Thursday, 2008-09-04, 10:31 PM | Message # 2
Newbie
Group: Member
Posts: 2
Status: Offline
da program displays the character at 0th position biggrin biggrin biggrin biggrin biggrin biggrin
 
ComE 211 Forum » Members and Groups Section » School Bulletin » ANSWERS ASSIGNMENT HERE (assingment on arrays)
  • Page 1 of 1
  • 1
Search:

Copyright MyCorp © 2024
Free website builderuCoz