Arista Networks Interview Questions
0of 0 votesProvide an implementation of the stack functionality [i.e. LIFO] in a library. Since its going to be a library function, it can accept objects of any type.
- Write the APIs
- Discuss how you would structure the API's to handle objects of any type
- What data structure would you use
- Since its a library API that you are providing, keep in mind that you will be dealing with multiple stacks and that an object can be present in more than one stack
0of 0 votesHow many spaces does the following struct take on a 32-bit computer?
struct s{
char c;
int i;
double d;
void *p;
int a[0];
}
0of 0 votesGiven a linked list of integers, delete all the nodes from the linked list which data value equals to a given value.
void delete(Node **l, int target);
0of 0 votesUsually first round consists of phone interviews.Try to finish your programming problems asap as the interviewer expects you to solve atleast 3-4
0of 0 votesPerform multiplication of two bytes without * operator!!!
Use shift operations
0of 0 votesPerform right rotate operation in C
unsigned char rotate(unsigned char c,int m)
Basically rotate m time the bits of char c
0of 0 votesUsually first round consists of phone interviews.Try to finish your programming problems asap as the interviewer expects you to solve atleast 3-4
0of 0 votesPerform multiplication of two bytes without * operator!!!
Use shift operations
0of 0 votesPerform right rotate operation in C
unsigned char rotate(unsigned char c,int m)
Basically rotate m time the bits of char c
0of 0 votesUsually first round consists of phone interviews.Try to finish your programming problems asap as the interviewer expects you to solve atleast 3-4
0of 0 votesPerform multiplication of two bytes without * operator!!!
Use shift operations
0of 0 votesPerform right rotate operation in C
unsigned char rotate(unsigned char c,int m)
Basically rotate m time the bits of char c
0of 0 votesUsually first round consists of phone interviews.Try to finish your programming problems asap as the interviewer expects you to solve atleast 3-4
0of 0 votesPerform multiplication of two bytes without * operator!!!
Use shift operations
0of 0 votesUsually first round consists of phone interviews.Try to finish your programming problems asap as the interviewer expects you to solve atleast 3-4
0of 0 votesPerform multiplication of two bytes without * operator!!!
Use shift operations
0of 0 votesPerform right rotate operation in C
unsigned char rotate(unsigned char c,int m)
Basically rotate m time the bits of char c
0of 0 votesUsually first round consists of phone interviews.Try to finish your programming problems asap as the interviewer expects you to solve atleast 3-4
0of 0 votesPerform multiplication of two bytes without * operator!!!
Use shift operations
0of 0 votesPerform right rotate operation in C
unsigned char rotate(unsigned char c,int m)
Basically rotate m time the bits of char c
0of 0 votesif(fork())
printf("MAGIC\n");
what is output??
0of 0 votesint rows=20000; int col=30000; void func1() { for(i=0;i<rows;i++) { for(j=0;j<col;j++) print(a[i][j]); } } void func2() { for(j=0;j<columns;j++) { for(i=0;i<rows;i++) print(a[i][j]); } }which function is more efficient ?
0of 0 votestest 1:
printf("test %s\n", NULL);
printf("test %s\n", NULL);
prints:
test (null)
test (null)
test 2:
printf("%s\n", NULL);
printf("%s\n", NULL);
prints
Segmentation fault (core dumped)
what is the difference in the above tests ? Why is segmentation fault not thrown in test 1 above ?
0of 0 votesCheck if a tree is a BST.
0of 0 votesFind the in-order successor of an element in a BST.
0of 0 voteswhat happens when BSS is mapped to address 0 ?
0of 0 voteswhat does a structure element a[0] mean ? what is it used for ?
0of 0 voteswhat does #define a ## b mean ?
0of 0 voteswhat is the size of short, int, pointer in 32 bit and 64 architectures ?
