Showing posts with label Datatype. Show all posts
Showing posts with label Datatype. Show all posts

Tuesday, February 28, 2017

Python (#2), List, Tuple and Dictionary

Python (#2), List, Tuple and Dictionary

This video is for the beginners who want to learn python in some minutes.This video will give you the detail about the Python, List,Tuple,Dictionary etc. How to write a hello world program in python? How to declare the List, Tuple,Dictionary in Python? How to use the datatypes in Python? How to use Multiple Assignment features of Python? And How to use the string in Python?
Do not forget to Subscribe the Channel "Learn TechToTech".
 
The link for the above YouTube video is:
 

https://youtu.be/a3Qa5LyJTL8

 
My YouTube Channel:(Learn TechToTech)
 
My Twitter Account :
https://twitter.com/rakesh_prof
My Facebook Account:
https://www.facebook.com/Learntechtotech
My Blog:

Friday, February 24, 2017

Basics of Python IDE, Datatypes, Variables, Multiple Assignment and Strings

Basics of Python IDE, Datatypes, Variables, Multiple Assignment and Strings

This video is for the beginners who want to learn python in some minutes.This video will give you the detail about the Python, Datatypes,Variables, Strings etc. How to write a hello world program in python? How to declare the variables in Python? How to use the datatypes in Python? How to use Multiple Assignment features of Python? And How to use the string in Python?
Do not forget to Subscribe the Channel "Learn TechToTech".
 

For watch the video for the above tutorial click on the following Link:

 
Subscribe my  YouTube Channel :
My Twitter Account :
https://twitter.com/rakesh_prof
My Facebook Account:
https://www.facebook.com/Learntechtotech
My Blog:
 
 

Sunday, August 28, 2016

Some Important conceptual output based questions of Arrays and Pointers in C lnaguage

Some Important conceptual output based questions of Arrays and Pointers in C language 

1. 
void main()
{
   int Blog[]={1,2,3};
   printf("%d %d %d",Blog[1],Blog[2],Blog[3]);
}

Output: 2 3 0

Explanation: Here Blog[0],Blog[1] and Blog[2] will be initialized with 1,2 and 3 respectively. and rest are initialized with 0.

2.
void main()
{
   int Blog[]={33,44};
   printf("%x",Blog);
 }

Output: Base address of Blog

Explanation: The array name always holds the base address of an array. If we print *Blog then output will be the first value.

3.void main()
{
  int Blog[4]={22,33,44,55},*ptr,T;
  ptr=Blog;
  T=++(*ptr);
  printf("%d %d",*ptr,T);
 }

Ans: 23 23

Exlanation: *ptr points to the first element of an array Blog. After ++(*ptr) , the value 
of first element is increased by 1 that is 23 and also updated to the array. Hence the output will be 23 23.

4.
void main()
{
  int Blog[4]={22,33,44,55},*ptr,T;
  ptr=Blog;
  T=*(ptr++);
  printf("%d %d",*ptr,T);
 }

Ans: 33 22

Explanation: *ptr points to the first element of an array Blog. After *(ptr++), the pointer ptr points to next element that is second element of array but due to post increment the variable T contains the first element of an array Blog.

Tuesday, August 23, 2016

Variable Declaration and Datatype in C language with their uses

Variable Declaration

The memory area used for storing the input data or intermediate data , is called variable.
There are some rules to declare the variables in C language:
1. Must be start with alphabet.
2. Special character is not allowed except _(Underscore).
3. Variable may be alphanumeric.
4. Variable name must be different from keywords used in C language like printf, scanf,eof etc.

The syntax for variable declaration is 
1. <datatype><space> <variablename>
2. <datatype><space> <variablename>=<value>

for example: int x;
int Num=10;
char str;
char str[45];

Datatype used in C language

A datatype is used to instruct the compiler that what type of data will be stored in variable. Different type of datatype are used in C language is:
1. int(2 to 4 byte)
2. float(4 Byte)
3. cha(1 byte)
4. double(8 byte)
5. long(4 Byte)

int and long datatype is used to store the integer , float and double are used to store the real values and char is used to store the character values.

Example:
int a,b;
char ch;
float Num;