Learn the new technologies and Programming Languages here. Here the tutorials, hidden facts of Different technologies of programming languages like Python, Internet of Things(IoT), Arduino, Android, C language, Java and Placement questions.
Showing posts with label array. Show all posts
Showing posts with label array. Show all posts
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.
Labels:
Application,
array,
B.Tech,
BCA,
C language,
conceptual,
Datatype,
Development,
important,
M.Tech,
main(),
MCA,
MCQs,
output,
placement,
pointer
Location:
Delhi, India
Sunday, August 21, 2016
Tips for Technical Interview in IT industry
Tips for Technical Interview in IT industry
- Prepare for a short introduction including the technical project which are genuinely done by you.
- Go through the website of company and get the information about company. for example: the company work for which domain primarily etc.
- Ask to seniors if any already working in the company about the technologies used by the company.
- Prepare yourself for the fundamentals of programming and algorithms because programming is the backbone of IT company.
- 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.
Labels:
array,
B.Tech,
BCA,
company,
Development,
dynamic,
Interview,
M.Tech,
MCA,
placement,
suggestion,
technical,
tips
Location:
Delhi, India
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.
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.
Location:
Delhi, India
Subscribe to:
Posts (Atom)