Facebook
From DW, 1 Year ago, written in Plain Text.
This paste is a reply to Re: CSE 2.1 CL2 from CL4 - go back
Embed
Viewing differences between Re: CSE 2.1 CL2 and CL5
#includeh>

h>
 
int main() {

    char line[100];
    
main()
 {

     /*int x;

     scanf("%d", &x);
     printf("Address of x is %dn",&x); //%x location of x in hexadecimal


     p = &x;

     printf("Address of p is %dn",p);

     *p=0;

     printf("Value of x is %dn",*p);

     printf("Value of x is %dn",x);

     printf("Address of p is %dn",&p);
     
int i, j, num, count=0;
    char vowels[11] = "aeiouAEIOU";
    printf("Enter a string: ");
    gets(line);

    for (i = 0; line[i] != '\0'; i++);
    num = i;


    for(i = num-1; i >= 0; i--) {
        printf("%c", line[i]);
    }

    printf("\nThe vowels are:");
    
y=10;

     p=&y;

     *p=3;

     printf("Address of p is %dn",p);
    printf("Value of p is %dn",*p);
    printf("Value of y is %dn",y);
    printf("Address of y is %dn",&p);

     int a[5], i;
     
for(i=0; line[i]!='\0'; i++)
            {
                for(j=0; vowels[j]!='\0'; j++)
                    {
                        if(line[i]==vowels[j])
                            {
                                count++;
                                printf("%c",line[i]);
                            }
                    }
              }
    printf("\nNumber of vowels = %d", count);



    return 0;
}
i<=4;i++)
        {
            scanf("%d",arr+i);
        }


        /*for(int i=0;i<5;i++)
        {
            printf("%dn",*arr+i);
        }
        */
        for(int i=0;i<=4;i++)
        {
            p= arr[4-i];
            printf("%dn",p);

        }
 }