Tip 1 : Work on basic concepts
Tip 2 : Brush up basic before going to interview
Tip 3 : Resolve coding issue
Tip 1 : Prepare whatever you have written in resume
Tip 2 : Have some projects on resume
Interview was conducted for on campus student i.e fresher so asked question from various subject including coding, logic design and electronics



'N' = 4,
4 can be represented as 2^2. So, 4 is the power of two, and hence true is our answer.
What will be output of below code snippet#include int *fun(){ int x = 5; return &x;}int main(){ int *p = fun(); printf("%d\n", *p) return 0;}
Output : A garbage Address
x is local variable and goes out of
scope after an execution of fun() is over
How will you protect global variable as it accessible from all function
We can use semaphore/Mutex
What is difference between below declaration char *p = "hello"; char p[] = "hello";
1. char *p = "hello"; will be stored in code segment
2. char p[] = "hello" will be store in stack segment
Write a prototype of function having argument as array of pointer and returning pointer of int type
int * (*func)(char *arr[])



a) Duplicate elements may be present.
b) If no such element is present return -1.
Input: Given a sequence of five numbers 2, 4, 5, 6, 8.
Output: 6
Explanation:
In the given sequence of numbers, number 8 is the largest element, followed by number 6 which is the second-largest element. Hence we return number 6 which is the second-largest element in the sequence.


1. If the list is empty, the function immediately returns None because there is no middle node to find.
2. If the list has only one node, then the only node in the list is trivially the middle node, and the function returns that node.
Traverse linked list using two-pointers. Move one pointer by one and the other pointers by two. When the fast pointer reaches the end, the slow pointer will reach the middle of the linked list
can we declare any local variable as extern
A local variable only exist in the local scope, as it is created on the stack
Explain storage classes
Explain auto, register, extern and static
What is difference between process and threads?
Threads are the part of process and share the virtual address space of the process. Threads are lightweight
because overhead of creating thread is less compared to process.
Communication between process is costly
How to avoid Structure Padding in C
to avoid structure padding we can use pragma pack
Given two candles. Each of them burns for one hour. They burn unevenly in different parts though. In addition, let’s have a box of matches. Measure 45 minutes and 15 minutes.
Moreover it based on analytical skill



Input : 1 -> 2 -> 3 -> 4 -> 'NULL' and 'K' = 2
Output: 1 -> 2 -> 4 -> 'NULL'
Explanation:
After removing the second node from the end, the linked list become 1 -> 2 -> 4 -> 'NULL'.





Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is the purpose of the return keyword?