Friday, June 7, 2019

Write a program to sum of entered number


/* ***********************************************
    Write a program to sum of entered number

 date:07-06-2019
 created by:ANIL DURGAM

*****************************************************/

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

int main()
{
    int a,sum=0;
    do{
         printf("enter a number(0 to stop)\n");
    scanf("%d",&a);
    sum+=a;

    }while(a!=0);
    printf("sum is =%d\n",sum);


    return 0;
}

out put::




Note:

please send the questions which you are facing problem in C Language.

also write interview questions which are you faced in during interview related to C Language.

so i can try to solve them and send you back.

Write a program to count the digits in the given number



/* ***********************************************
    Write a program to count the digits in the given number

 date:07-06-2019
 created by:ANIL DURGAM

*****************************************************/
#include <stdio.h>
#include <stdlib.h>

int main()
{
    int a,count=0,rem;
    printf("enter the number\n");
    scanf("%d",&a);
    do{

        a/=10;
    count++;

    }while(a>0);
    printf("number of digits==%d\n",count);



    return 0;
}

output:::


Note:

please send the questions which you are facing problem in C Language.

also write interview questions which are you faced in during interview related to C Language.

so i can try to solve them and send you back.

variable declaration in python


example 1:

print('3'+'5')
a='3'
b='5'
c=a+b
print(c)
print(type(c))

output:
35
35
<class 'str'>

example 1:

Favoritecolor="red"

favoritecolor="yellow"

print(Favoritecolor,"\n",favoritecolor)

output:
red
 yellow

python class topic video