Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
(10) #include<stdio.h>
int main( )
{
char arr[ ] = “Pickpocketing my peace of mind..” ;
int I ;
printf(“%c\n”, *arr ) ;
arr++ ;
printf (“%c\n”, *arr) ;
return 0 ;
}
(17) #include<stdio.h>
int main( )
{
char str[] = “Shall we tell the Deputy Director?” ;
printf (“%s\n%s\n”, str, str +6, str +9) ;
return 0 ;
}
( 21) #include<stdio.h>
int main( )
{
int arr[12] ;
printf(“%d\n”, sizeof ( arr ) ) ;
return 0 ;
}
(22) #include <stdio.h>
int main( )
{
char *mess[] = {
“Some love one”
“Some love two”,
“ l love one”
“That is you”
};
printf(“%d %d\n”, sizeof (mess), sizeof (mess[1]) ) ;
return 0 ;
}
(23) #include<stdio.h>
int main( )
{
char names[3][20] ;
int I ;
for ( I = 0 ; <=2 ;i++ )
{
printf(“ENTER NAME:\n” ) ;
scanf(“%s”, names[i] ) ;
printf(“You entered %s\n”, names[i] ) ;
}
return 0 ;
}
(24) #include<stdio.h>
int main( )
{
char names[5][20] = {
“Roshni”
“Manish”,
“Mona”,
“Baiju”,
“Ritu”
};
int I ;
char*t ;
t = names[3] ;
names[3] = names[4] ;
names[4] = t ;
for ( I = 0 ; i<= 4 ; i++ )
printf(“%s\n”, names[i] ) ;
return 0 ;
}
(25) include <stdio.h>
int main( )
{
char mess[6][30] = {
“Don’t walk in front of me..”,
“I may not follow ;”
“Don’t walk behind me…” ,
“ I may not lead ;”
“just walk beside me….”,
“And be my friend.”
Printf(“%c %c\n”, *(mess[2] +9), *( *(mess +2) +9 ) ) ;
Return 0 ;
}