Showing posts with label array. Show all posts
Showing posts with label array. Show all posts

Sunday, August 28, 2016

Video for the concept of Array and pointers

Example Program of Array and Pointers (Video)

https://www.youtube.com/watch?v=lT5D08ofRBQ

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.

Sunday, August 21, 2016

Tips for Technical Interview in IT industry

Tips for Technical Interview in IT industry

  1. Prepare for a short introduction including the technical project which are genuinely done by you.
  2. Go through the website of company and get the information about company. for example: the company work for which domain primarily etc.
  3. Ask to seniors if any already working in the company about the technologies used by the company.
  4. Prepare yourself for the fundamentals of programming and algorithms because programming is the backbone of IT company.
  5. Prepare yourself comfortable upto average level(Concepts of classes,functions,datatypes,looping,conditional statement) for any one programming languages or tool.
post your query related to technical interview.

Different way to access array elements

Do you know there are many ways to access the elements of array.
int Num[10];
for(int i=0;i<10;i++)
    printf("%d%d%d%d",Num[i],i[Num],*(Num+i),*(i+Num));
Here all the format will give the same result that is every element of Array.