-->

WAP to input a string and to print its address(character's) with its value.

//progrm to print address and value of a string given by user.
#include <stdio.h>
int main()
{
    char name[30];
    char *p;
    int i=0;
    printf("enter the string\n");
    scanf("%s",name);
    p=name;//assigning base address
    while(*p!='\0')//condition testing
    {
    printf("the address=%d and value=%c\n",p+i,*p);//printing value and address
   *p++;//changing the value
    i++;//changing the value of i
    }
 

    return 0;
}

python program to print sum of two numbers 3 and 4

type following code in IDLE.
-----------------------------------------
#program to print sum of two numbers 3 and 4 #comment of program

a=3   #assigning value to a variable
b=5    #assigning value to variable
sum=a+b#forumaltion
print("the sum of two numbers is=\n",sum)#printing the sum
print("the sum of numbers",a,"and",b,"is",sum)#we can print values by putting comma





python program to print hello python with single line comment

type following code in IDLE
------------------------------------------------------------------

#program to print python #comment of program

print("hello python")   #prints the string hello python

python program to print hello python with comment

"""
first program in python  #multi line comment using triple quotes
"""
print("hello python")   #prints the string hello python