Showing posts with label conceptual. Show all posts
Showing posts with label conceptual. Show all posts

Saturday, February 18, 2017

How to Control LED lights through Arduino Uno

How to Control LED lights through Arduino Uno

This Program will show you that how to control LED Lights through the Arduino Uno. This will show you all connection step by Step in very Simple Manner. Definitely you will understand the program after watching this video.

Click on the below link to see the video for how to Control LED lights through Arduino Uno:


My Twitter Account :
https://twitter.com/rakesh_prof

My Facebook Account:
https://www.facebook.com/AsstProfRakeshRoshan

My Blog:
https://computersciencebyrakesh.blogspot.in/

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.