Aricent Interview Questions
- 0of 0 votes
AnswersAlex has recently decided to learn about how to design compilers. As a first step he needs to find the number of different variables that are present in the given code.
- misterraj.ruchit February 18, 2017 in India
So Alex will be provided N statements each of which will be terminated by a semicolon(;). Now Alex needs to find the number of different variable names that are being present in the given statement. Any string which is present before the assignment operator denotes to a variable name.
Input Format: :
The first line contains a single integer N
Each of the next N lines contains a single statement.
It is guaranteed that all the given statements shall be provided in a valid manner according to the format specified.
Output Format: :
Print the number of different variable name that are present in the given statements.
Sample Input
2
foo = 3;
bar = 4;
Sample Output
2
Explanation
Foo and Bar are only two variables used inside the statements so answer is 2.| Report Duplicate | Flag | PURGE
Aricent Software Engineer Java - 0of 0 votes
AnswersWhat is difference between critical section and mutex.??
- Kavita July 13, 2014 in India
Can we use mutex across the process??| Report Duplicate | Flag | PURGE
Aricent Applications Developer - 0of 0 votes
AnswersWhat is memory leak and write a shell script to find memory leak ?
- arunpro13 February 12, 2014 in India| Report Duplicate | Flag | PURGE
Aricent Testing / Quality Assurance Unix - 13of 13 votes
AnswersHow its possible to have only a specific Functionality as per the user Object should have , not all the functionality of the class to be loaded in object only user specific functionality?
- d.sujith November 27, 2012 in India| Report Duplicate | Flag | PURGE
Aricent Technical Architect - 0of 0 votes
AnswersHow can we have an Abstract Class without any using any virtual Function in it ?
- d.sujith November 27, 2012 in India| Report Duplicate | Flag | PURGE
Aricent Technical Architect C++ - 0of 0 votes
Answers
- Aashish June 27, 2012 in Indiavoid freeList( struct node *n ) { while( n ) {????} } Which one of the following can replace the ???? for the function above torelease the memory allocated to a linked list? Choice 1 n = n->next; free( n ); Choice 2 struct node m = n; n = n->next; free( m ); Choice 3 struct node m = n; free( n ); n = m->next; Choice 4 free( n ); n = n->next; Choice 5 struct node m = n; free( m ); n = n->next;
| Report Duplicate | Flag | PURGE
Aricent Software Engineer / Developer Algorithm - 0of 0 votes
Answersvoid *ptr;
- Aashish June 27, 2012 in United States
myStruct myArray[10];
ptr = myArray;
Which of the following is the correct way to increment the variable "ptr"?
Choice 1 ptr = ptr + sizeof(myStruct);
Choice 2 ++(int*)ptr;
Choice 3 ptr = ptr + sizeof(myArray);
Choice 4 increment(ptr);
Choice 5 ptr = ptr + sizeof(ptr);| Report Duplicate | Flag | PURGE
Aricent Software Engineer / Developer Algorithm - 0of 0 votes
Answerhow to create final class in c++
- prabhat July 05, 2011| Report Duplicate | Flag | PURGE
Aricent Software Engineer / Developer - 0of 0 votes
Answersdefine class such that you can make object of this class on a heap but not on the stack.
- prabhat July 05, 2011| Report Duplicate | Flag | PURGE
Aricent Developer Program Engineer - 0of 0 votes
AnswerDescribe your projects
- Mohit N Kewalramani February 17, 2011| Report Duplicate | Flag | PURGE
Aricent Software Engineer / Developer - 0of 0 votes
Answershow will you read all english sentences from a text file containing normal english text e.g. a story or a simple document.
- wannabedeveloper August 03, 2009| Report Duplicate | Flag | PURGE
Aricent Consultant Algorithm - 0of 0 votes
AnswersWhat is the different between .a .o .out files?
- Raady October 18, 2008| Report Duplicate | Flag | PURGE
Aricent Software Engineer in Test C - 0of 0 votes
AnswersWhat happens when u delete a null pointer?
- Raady October 18, 2008
char *p;
del *p;
*p=null;
del *p| Report Duplicate | Flag | PURGE
Aricent Software Engineer in Test C - 0of 0 votes
AnswersWhat happens when u delete a pointer twice
- Raady October 18, 2008
del *p;
del *p;
What is this error called? How to avoid such double deletes?| Report Duplicate | Flag | PURGE
Aricent Software Engineer in Test C - 0of 0 votes
AnswerCompare and contrast dynamic array & linked list
- Raady October 18, 2008| Report Duplicate | Flag | PURGE
Aricent Software Engineer in Test Linked Lists - 0of 0 votes
AnswersWhy is malloc preferred over calloc?
- Raady October 18, 2008| Report Duplicate | Flag | PURGE
Aricent Software Engineer in Test C - 0of 0 votes
AnswersHow is the memory allocation done for a union?
- Raady October 18, 2008| Report Duplicate | Flag | PURGE
Aricent Software Engineer in Test C - 0of 0 votes
AnswersWhat is the return type of constructor?
- Raady October 18, 2008| Report Duplicate | Flag | PURGE
Aricent Software Engineer in Test C - 0of 0 votes
AnswersWhy do we need abstract classes?
- Raady October 18, 2008| Report Duplicate | Flag | PURGE
Aricent Software Engineer in Test Object Oriented Design