/*string length using ptr*/ #include void main() { char s[10]; int i=0; int *ptr; ptr=&s[0]; printf("\n\t enter a string"); gets(s); while(s[i]!=NULL) { i++; ptr++; } printf("length of string=%d",i); }
/*Display the length of string by using pointer*/ #include void main() { char s[8]; int i=0; int *ptr; ptr=&s[0]; printf("\n\tEnter a string"); gets(s); while (s[i]!=NULL) { i++; ptr++; } printf("\n\tLength of string=%d",i); }
/*pointer to pointer*/ #include void main() { int i=2; int *j; int **k; j=&i; k=&j; { printf("\n\t value of j=%d",*j); } { printf("\n\t value of k=%d\n",**k);
/*Display the length of string by using pointer*/ #include void main() { char s[8]; int i=0; int *ptr; ptr=&s[0]; printf("\n\tEnter a string"); gets(s); while (s[i]!=NULL) { i++; ptr++; } printf("\n\tLength of string=%d",i); }
/*Display the length of string by using pointer*/ #include void main() { char s[8]; int i=0; int *ptr; ptr=&s[0]; printf("\n\tEnter a string"); gets(s); while (s[i]!=NULL) { i++; ptr++; } printf("\n\tLength of string=%d",i); }
/*Display the length of string by using pointer*/ #include void main() { char s[8]; int i=0; int *ptr; ptr=&s[0]; printf("\n\tEnter a string"); gets(s); while (s[i]!=NULL) { i++; ptr++; } printf("\n\tLength of string=%d",i); }
#include void main() { char s[8]; int i=0; int *ptr; ptr=&s[0]; printf("\n\t enter a string"); gets(s); while(*ptr!=NULL) { i++; ptr++; } printf("length of string=%d",i); }
/*string length using ptr*/
ReplyDelete#include
void main()
{
char s[10];
int i=0;
int *ptr;
ptr=&s[0];
printf("\n\t enter a string");
gets(s);
while(s[i]!=NULL)
{
i++;
ptr++;
}
printf("length of string=%d",i);
}
/*Display the length of string by using pointer*/
ReplyDelete#include
void main()
{
char s[8];
int i=0;
int *ptr;
ptr=&s[0];
printf("\n\tEnter a string");
gets(s);
while (s[i]!=NULL)
{
i++;
ptr++;
}
printf("\n\tLength of string=%d",i);
}
/*pointer to pointer*/
ReplyDelete#include
void main()
{
int i=2;
int *j;
int **k;
j=&i;
k=&j;
{
printf("\n\t value of j=%d",*j);
}
{
printf("\n\t value of k=%d\n",**k);
}
}
#include
ReplyDelete#include
void main()
{
char s[10];
int i=0;
int *p;
p=&s[0];
printf("\n\t enter a string===");
gets(s);
while(*p!=NULL)
{
i++;
p++;
}
printf("\n\t Length of string==%d",i);
}
#include
ReplyDeletevoid main()
{
int i=0;
char str[8]="welcome";
int *p1;
p1=&str[0];
while(*p1!=NULL)
{
i++;
p1++;
}
printf("\n\t length =%d",i);
}
/*Display the length of string by using pointer*/
ReplyDelete#include
void main()
{
char s[8];
int i=0;
int *ptr;
ptr=&s[0];
printf("\n\tEnter a string");
gets(s);
while (s[i]!=NULL)
{
i++;
ptr++;
}
printf("\n\tLength of string=%d",i);
}
/*pointer to pointer display content*/
ReplyDelete#include
void main()
{
char str[10]="sknscoe";
int*p;
p=&str[0];
while(*p[i]|=NULL)
{i++;
p++;
}
printf("\n\t legth=%d",i);
}
/*Display the length of string by using pointer*/
ReplyDelete#include
void main()
{
char s[8];
int i=0;
int *ptr;
ptr=&s[0];
printf("\n\tEnter a string");
gets(s);
while (s[i]!=NULL)
{
i++;
ptr++;
}
printf("\n\tLength of string=%d",i);
}
/*Display the length of string by using pointer*/
ReplyDelete#include
void main()
{
char s[8];
int i=0;
int *ptr;
ptr=&s[0];
printf("\n\tEnter a string");
gets(s);
while (s[i]!=NULL)
{
i++;
ptr++;
}
printf("\n\tLength of string=%d",i);
}
#include
ReplyDeletevoid main()
{
char s[8];
int i=0;
int *ptr;
ptr=&s[0];
printf("\n\t enter a string");
gets(s);
while(*ptr!=NULL)
{
i++;
ptr++;
}
printf("length of string=%d",i);
}
#include
ReplyDeletevoid main()
{
int i=0;
char str[8]="welcome";
int *p1;
p1=&str[0];
while(*p1!=NULL)
{
i++;
p1++;
}
printf("\n\t length =%d",i);
}