Quantcast
Channel: Interview Topics and Questions
Viewing all 129 articles
Browse latest View live

CISCO 2012 Placement papers | cisco placement papers 2012 pattern | cisco placement papers with answers

$
0
0

CISCO: 2012: Sept at Chennai





 There were almost 40 technical questions and 10 analytical questions. Total 50 questions.



Cisco Placements Technical questions :

1. Which of the following is connectionless protocol

Ans: UDP(User Datagram Protocol)

2.

 #define clrscr() 100

main()

{

clrscr();

printf("%d",clrscr());

}

3. Which of the following is used for avoiding network congestion

buffering

caching

source-quench

all of the above

4. main()

{

int a;

printf("%d",scanf(%d,&a));

}

whats o/p of this program..what will b printed

Ans :0

5.

main()

{

printf("as");

printf("\bhi");

printf("is\n");

}

wat will b printed.

6.

main()

{

unsigned short a=-1;

unsigned char b=a;

printf("%d %d ",a,b);

}

wat is o/p of the program

a. 65535 -1 b. 65535 65535 c. -1 -1

7. Arrays base address is 1000....array is a[5][4]..then wat is de

correct address of a[4][3].

Ans:1056

8. One packet is 64 bytes no. of pkts send is 16000 then total no. of bytes send is

Ans 1024000

9. #define maxval 5

int main (void)

{

int i=1;

if(i-maxval)

{

printf("inside");

}

else

{

printf("out");

}

find o/p???

10.

#define a 3+3

#define b 11-3

main()

{

printf("%d",a*b);

}

what is o/p?????

11. A question in which segment address is given logical address is 800 base addresses also given you have to find physical address.

12. Stack is used in a task

Ans: temporary variables values

13. Which of de following is not stored in activation record..

Ans: some heap area

14. main{

printf("%d",-1<<4); } wats o/p??? ans: 0xfff0

15. main() { int* s s=10 printf("%d,%d,%d,%d,%d,%d",*s++,(*s)++,++*s,++(*s)); } whats o/p?

16. There was a question on processor speed in nanocycles..then it performs a instruction in x cycles..dont remember

17. main() { int *i; int s=(int *)malloc(10*sizeof(int)); for (i=0;i<10;i++) { printf("%d",i*i) } wats o/p

18. One more similar question Cisco  Conducted On   Computer awareness test.

1. In the command scanf, h is used for

Ans. Short int

2. A process is defined as

Ans. Program in execution

3. A thread is

Ans. Detachable unit of executable code.

4. What is the advantage of Win NT over Win 95

Ans. Robust and secure

5. How is memory management done in Win95

Ans. Through paging and segmentation

6. What is meant by polymorphism

Ans. Redefinition of a base class method in a derived class

7. What is the essential feature of inheritance

Ans. All properties of existing class are derived

8.What does the protocol FTP do

Ans. Transfer a file b/w stations with user authentication

9.In the transport layer ,TCP is what type of protocol

Ans. Connection oriented

10.Why is a gateway used

Ans. To connect incompatible networks

11.How is linked list implemented

Ans. By referential structures

12.What method is used in Win95 in multitasking

Ans. Non preemptive check

13.What is meant by functional dependency

14.What is a semaphore

Ans. A method synchronization of multiple processes

15.What is the precedence order from high to low ,of the symbols ( ) ++ /

Ans.( ) , ++, /

16.Preorder of A*(B+C)/D-G Ans.*+ABC/-DG

18. B-tree (failure nodes at same level)

19. Dense index (index record appears for every search -key in file)

20.What is the efficiency of merge sort

Ans. O(n log n)

21.A program on swapping ( 10,5 )was given (candidate cannot recollect)

22.In which layer are routers used

Ans.In network layer 23.In which layer are packets formed ( in network layer )

24. heap ( priority queue )

25. Copy constructor ( constant reference )

26.Which of the following sorting algorithm has average sorting behavior,  Bubble sort, merge sort, heap sort, exchange sort

Ans. Heap sort

27.In binary search tree which traversal is used for getting ascending order values Inorder, post order, preorder Ans. In-order

28.What are device drivers used for

Ans.To provide software for enabling the hardware

29. Irrelevant to UNIX command ( getty)

30.What is fork command in UNIX

Ans. System call used to create process

31.What is make command in UNIX

Ans. Used for-creation of more than one file

32.In UNIX .profile contains

Ans. Start up program

33.In UNIX echo is used for

( answer C)

34.In UNIX 'ls 'stores contents in

Ans.inode block QUANTITATIVE SECTION

1. In a class composed of x girls and y boys what part of the class is composed of girls A.y/(x + y) B.x/xy C.x/(x + y) D.y/xy [Ans.C ]

2.What is the maximum number of half-pint bottles of cream that can be filled with a 4-gallon can of cream(2 pt.=1 qt. and 4 qt.=1 gal) A.16 B.24 C.30 D.64 [Ans.D ]

3. If the operation,^ is defined by the equation x ^ y = 2x + y,what is the value of a in 2 ^ a = a ^ 3 A.0 B.1 C.-1 D.4 [Ans.B ]

4. A coffee shop blends 2 kinds of coffee,putting in 2 parts of a 33p. a gm. grade to 1 part of a 24p. a gm. If the mixture is changed to 1 part of the 33p. a gm. to 2 parts of the less expensive grade,how much will the shop save in blending 100 grams. A.Rs.90 B.Rs.1.00 C.Rs.3.00 D.Rs.8.00 [Ans.C ]

5. There are 200 questions on a 3 hr examination. Among these questions are 50 mathematics problems. It is suggested that twice as much time be spent on each maths problem as for each other question. How many minutes should be spent on mathematics problems A.36 B.72 C.60 D.100

Ans.B

6. In a group of 15,7 have studied Latin, 8 have studied Greek, and 3 have not studied either. How many of these studied both Latin and Greek A.0 B.3 C.4 D.5

Ans.B

7. If 13 = 13w/(1-w) ,then (2w)2 = A. 1/4 B. 1/2 C. 1 D. 2 [Ans.C ]

8. If a and b are positive integers and (a-b)/3.5 = 4/7, then (A) b < a (B) b > a

(C) b = a (D) b >= a [Ans. A]

9. In June a baseball team that played 60 games had won 30% of its game played. After a phenomenal winning streak this team raised its average to 50% .How many games must the team have won in a row to attain this average? A. 12 B. 20 C. 24 D. 30 [Ans. C]

10. M men agree to purchase a gift for Rs. D. If three men drop out how much more will each have to contribute towards the purchase of the gift.

A. D/(M-3) B. MD/3 C. M/(D-3) D. 3D/(M2-3M) [Ans. D]

11. A company contracts to paint 3 houses. Mr.Brown can paint a house in 6 days while Mr.Black would take 8 days and Mr.Blue 12 days. After 8 days Mr.Brown goes on vacation and Mr. Black begins to work for a period of 6 days. How many days will it take Mr.Blue to complete the contract? A. 7 B. 8 C. 11 D. 12 [Ans.C]

 12. 2 hours after a freight train leaves Delhi a passenger train leaves the same station travelling in the same direction at an average speed of 16 km/hr. After traveling 4 hrs the passenger train overtakes the freight train. The average speed of the freight train was?

A. 30 B. 40 C.58 D. 60 [Ans. B]

 13. If 9x-3y=12 and 3x-5y=7 then 6x-2y = ? A.-5 B. 4 C. 2 D. 8 [Ans. D]


Iphone developer technical Task : Enhancements in the App

$
0
0
Here is a simple Unit converter App.
Description : If you Enter any integer in the textfields,it gives the conversions as per the mentioned format.

So the actual task goes here..

It needs few enhancements that can be implemented with some additional piece of logic.
Find out where the App is lacking the behaviour of unit Conversion interms of UI(user interface) and implement them.

For your reference the actual code:

unitConverter.h


#import <UIKit/UIKit.h>
@interface ViewController : UIViewController<UITextFieldDelegate>
{
IBOutlet UITextField *txt1;
IBOutlet UITextField *txt2;
IBOutlet UITextField *txt3;
IBOutlet UITextField *txt4;
IBOutlet UIButton *btn;

}

-(IBAction)showValues:(id)sender;
@end

unitConverter.m


-(IBAction)showValues:(id)sender
{

if ([txt2 isFirstResponder])
{

NSString *inputString = [[NSString alloc]initWithFormat:txt2.text];
int value = [inputString intValue];
NSLog(@"%x",value);
txt3.text=[NSString stringWithFormat:@"%x", value];
txt2.text=[NSString stringWithFormat:@"%o", value];
txt4.text=[NSString stringWithFormat:@"%d", value];
}


else if ([txt3 isFirstResponder])
{

NSString *inputString = [[NSString alloc]initWithFormat:txt3.text];
int value = [inputString intValue];
NSLog(@"%x",value);
txt3.text=[NSString stringWithFormat:@"%x", value];
txt2.text=[NSString stringWithFormat:@"%o", value];
txt4.text=[NSString stringWithFormat:@"%d", value]; }

else if ([txt4 isFirstResponder])
{

NSString *inputString = [[NSString alloc]initWithFormat:txt4.text];
int value = [inputString intValue];
NSLog(@"%x",value);
txt3.text=[NSString stringWithFormat:@"%x", value];
txt2.text=[NSString stringWithFormat:@"%o", value];
txt4.text=[NSString stringWithFormat:@"%d", value];
}

}

- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
[textField resignFirstResponder];
return YES;
}

ScreenShots for your understanding.



Note : Please do Mapping in the xib file inorder to make the app work in the device or simulator.As there is a delegate for the textField (hide keypad) make sure that you do reverse mapping for the delegate to the file's owner.




How to Send 0x00 as Hex data over UDP protocol?

$
0
0
While to send hex data over UserDataGram protocol i.e

char buffer[20]={0xEA,0xEB,0x00,0x01,0xFE};

addrlen = sizeof(struct sockaddr_in);
sendto( s, buffer, strlen(buffer)+1, 0, (struct sockaddr*)&addr, addrlen );
At client side am receiving only 0xEA,0xEB

Ooops,

0x00 consider as null and data after this, is not sending.Can anyone give solution for this?.

Robert Bosch Latest Interview Questions | Robert Bosch Frequently asked questionare | Robert Bosch Interview Experiences

$
0
0



The selection process consists of 4 rounds namely, written test followed by TR,HR, and final round.

While coming to written test you have to prepare Electronic Devices & Circuits,Digital electronics, C language, Aptitude, Reasoning, English.

Total 60 questions(35 technical,25 aptitude,reasoning and English) duration is 60 minutes. 


1.Electronic Devices & Circuits

 Diodes, Transistors, Oscillators , Filters
 
2.Digital Electronics

Combinational and sequential circuits , Logic gates simplification, ROM , RAM, EPROM, EEPROM etc....

3.C Language

 They have given only 3 questions. They are so simple you all can answer those.

4.Aptitude, reasoning and English - For this you have to prepare RS AGARWAL verbal and non-verbal text book. These questions are little bit tough.

In TR they are mostly asking questions on C language, Project, Electronic Devices & Circuits and Digital electronics.In order to clear this round you have to thorough in C programming and your project in depth.

In HR they are testing your confidence levels, asking about your personal profile , about company and the company working areas etc.

All the best :) For those Who are attending Robert Bosch.

VVDN Technologies interview questions | VVDN FAQ

$
0
0
C Output Questions : They wanted to test your Practical Knowledge,so give your maximum effort to prove your practical experiences.Never Stick to the particular output if your not confident enough.

Electonics :

Problems in Op-amp's-For this you need to give Solutions.

Digital Electronics :
Outputs for gate
 Example:(For your Reference)

They give you a circuit and you need to tell which gate Functionalty it is.

Basic Electronics:

Questions from Basic Electronics are simple, if your thorough with the problem solvings in BE.
They asked Formulas for Power, Voltage for devices like Diodes,transistors and Transformers etc.
 B.Tech Project which is crucial to get in the TR.

C Language :
Be Prepared well in C Programming.Questions from C are unexpected. 

Controllers : 

Real Time Circuits
Protocols maily SPI and I2C.

Linux Documentation Project

$
0
0

Linux documentation Project which contains
all the guides related to Linux. Like.,
Shell scripting tutorial,
Kernal
Module Programming Guide etc
Can download it right away from Guides Section.
Follow the link HERE

SYNFOSYS Previous Papers

$
0
0


 MARKS-75                              TIME :90 MINS                                                
                      SECTION <A>           PUZZLES                     MARKS(2*10)                                            

1>Given a number x, less than 100. How will you generate true with probability x/100. So if x = 65, how will you generate true with probability 65/100. You can represent true by 1 and false by 0.

SOL:     void foo(  )
               {
                   int X=65,NUM;
                   NUM=rand( )%100 + 1;
                   if(NUM<=X)
                     printf("true");
                  else
                     printf("false");
           }

2>  Given 50 red pens and 50 blue pens, two jars(A,B) initially empty. These 100 pens are to be distributed b/w the jars such that the probability of picking a red pen is maximum.
               
SOL:
              We need to add the probability of finding a red pen in one jar and add it to the probability of finding it in the other.
So the probability would  b:
  0.5x0.5 (probability of picking Jar A)x(probability of picking red pen in that jar) + 0.5x0.5 (probability of picking Jar b)x(probability of picking red pen in that jar) = 0.5
But there exists a distribution in which the probability of picking one color pen can be increased and i.e. put 1 red pen in jar A and other 49 red and 50 blue in jar B.
 This gives us the probability of picking red pen as 0.5x1 (probability of picking Jar A)x(probability of picking red pen in that jar) + 0.5x(49/99) (probability of picking Jar b)x(probability of picking red pen in that jar) = .7474 ANS

                 
                  SECTION<B>                MULTIPLE CHOICE          MARKS (1*10)              

1> void main()
    {
   int i=320;
   char *ptr=(char *)&i;
   printf("%d",*ptr);
}                       ANS-64

2>#define x 5+2
  void main()
  {
    int i;
    i=x*x*x;
    printf("%d",i); ANS 27
}

3>void main(){
char c=125;
    c=c+10;
    printf("%d",c);  ANS -121
}

4>void main(){
   float a=5.2;
  if(a==5.2)
     printf("Equal");
  else if(a<5.2)
     printf("Less than");
  else
     printf("Greater than");  ANS- less than
}

5>void main(){
  int i=4,x;
  x=++i + ++i + ++i;
  printf("%d",x);       ans-in gcc-18 in turbo c-21
}
6>  void main(){
 int a=2;
 if(a==2){
   a=~a+2<<1;
   printf("%d",a);   ans-compiler error
 }
 else{
  break;
 }
}

7>void main(){
  int a=10;
  printf("%d %d %d",a,a++,++a);ans-12,11,11
}


8>void main(){
   char *str="Hello world";
   printf("%d",printf("%s",str)); ans-hello world11
}

9>void main(){
   char *str=NULL;
   strcpy(str,"cquestionbank");  ans-turbo c-(null)i.e null ptr assignment
   printf("%s",str);                 gcc-runtime error
}

10>void main(){
  int i=0;
  for(;i<=2;)
   printf(" %d",++i); ans 1,2,3
}

                                        SECTION<C>                                          MARKS(3*5 )                                                                    

1> Explain the memory representation of int a=7;

ANS:        if binary num is in form-    ABCD          00000000|00000000|00000000|00000111
         then  memory representation is -CDBA          00000000|00000111|00000000|00000000                                    
                                                   

2>Explain floating point representation of real numbers:?
sol:
      float num: 1.46    by IEEE STD: sign bit:      1
                                      expo bit:       8
                                     significant bit:23
     bias value:127
         try urself

3>find the size of function?

  sol: there is no predefined operator or any library function to calculate the  size of any userdefined function:we can calculate size of fn by finding the size of each variables
encountered in that function;
example:
         void foo()
         {
           int arr[20];
            int x=10;
            int *ptr=&x;
}                             ANS>>   SIZE= sizeof(arr)+ sizeof(x)+sizeof(ptr);

4>convert integer to string??
  main()
{
 int num=6;
  char buf[10];
 sprintf(buf,"%d",num);
 printf("%s",num);
}
5>compare two strings which are present in different memory location??
 void cmp(char *str,char *ptr)
{
  if(strcmp(str,ptr)==0)
    printf("equal")
else
    printf("not equal");
}


                                            SECTION<D>                          MARKS(7.5 * 4)                             

1>REVERSE THE NUMBER USING POINTER ex inp-109012 o/p 210901?
 
SOL: int rev(int *num)          main()
                                 { int num=12345;
                              pf("%d",rev(&num));
                                  }
      {
       int r,sum=0;
         while(*num)
         {
            r=*num%10;
            sum=sum*10 + r;
           *num/=10;
       }
         return sum;
}

2>string uppercase to lowercase and vice versa?
sol:main()
   {
    char str[100],buff[100],ch;
     int i,j,k=0;
   printf("enter str:");
    gets(str);
      for(i=0;str[i];i++)
       {
            ch=str[i];
            if(ch>='A'&&ch<='Z')
            buff[k]=ch+32;
            else if(ch>='a'&& ch<='z')
             buff[k]=ch-32;
              k++;
      }
          puts(buff);
}

3>find the location of substring in a given string:if string is "synfosyssolution" and sub string is
  "sol" :then output will b 9 ?
main()
{
char  str[]="synfosyssolution";
char sub[]="sol";
int i,j,cnt=0;
for(i=0;str[i];i++)
{
  if(str[i]==sub[0])
   {
     for(j=1;sub[j];j++)
      {
        if(str[i+j]!=sub[j])
         {
           break;
         }
      }
   }
     if(sub[j]!='\0')
      cnt++;
}
printf("sub str found at pos :%d\n",cnt+1);
}

5>Reverse word of a sentence??if input is "synfosys business soln ltd" than output will be "ltd soln business synfosys"??
       void xrev(char *,char *)
sol:   main()
       {
          char str[]="synfosys business soln ltd";
           char *ptr=0,*x=0,*y=0;
          for(ptr=str;*ptr;ptr++);//move ptr to last
            xrev(ptr-1,str)
            x=str-1;
           
            y=str;
      while(x++<ptr)
        {
       if(*x=='0'||*x==' ')
        {
            xrev(y,x-1)
            y=x+1;
         }
}
void rev(char *l,char *r)
{
 char t;
while(l<r)
{
t=*l;
*l++=*r;
*r--=t;
}
}

Campus DXCorr: Skills Required & Previous Interview Questions Pattern

$
0
0


DXcorr is an IP design house and gives all round development and learning opportunity to candidates in VLSI domain.

Skills: VLSI Topics, Digital, CMOS, Project

Previous Interview Questions:

75% of the questions asked were on Project, Apart from that, here are some extra questions that were asked,
1.  Define Setup Time and Hold Times.

2.  Difference between Flip-Flop and Latch.

3.  Techniques to overcome Setup/hold time violations.

4.  Define Threshold Voltage.

5.  Layout precautions to be observed for Analog/Mixed Signal Layout.

6.  A few questions on Operational Amplifiers.

7.  Define DRC and LVS.

8.  ASIC Design Flow.

9.  Flash A/D converters (Since this was one of my projects)

Tools to be familiar with Cadence Virtuoso and Diva.

Following are some of the links about c questions.

$
0
0


http://www.cquestions.com

http://www.a2zinterviews.com/Languages/c/index.php

http://www.indiabix.com/technical/c

http://rajeshstutorials.blogspot.in/2012/11/c-interview-questions-answers-for-freshers.html

Procedure for the Keil evaluation link

$
0
0

 Please find the Keil evaluation link at the following address.

www.keil.com/demo/eval/c51.htm

After typing the above link in the Browser, you will get a form with very
few mandatory fields to be filled.

After filling and submitting the form, you will be redirected to the
download page.

The download page contains the Hardware requirements and Limitations of
evaluation which can be keeping in mind at the time of programming

The download page contains the Software link in a box, which will be
download after click on the link.

In the similar way You can download ARM development kit also.

Please find the following links related to some of the popular books on networking.

$
0
0


1. Data communications and Networking - Behrouz Forouzan

http://kat.ph/data-communications-and-networking-behrouz-a-forouzan-pdf-t6531499.html

2. Unix Network Programming - Richard Stevens

http://kat.ph/unix-network-programming-volume-1-2nd-edition-richard-stevens-pdf-t6166399.html

3. TCP/IP Protocol Suite - Forouzan

http://kat.ph/tcp-ip-protocol-suite-4th-edition-bbs-t5884951.html

SAFRAN Recruiting Process -Interview process @ Safran

$
0
0

  Following rounds are conducted at Safran Recruiting Process

Written Test:

C & APTITUDE are the Topics Covered in the Written Test mostly

Techinical Rounds:

 2 rounds of Technical panel.


The main Focus is on C Language ...
Learn the concepts in depths, where they mainly focus much on the indepth topics like pointer & Arrays,structure,functions.

Inorder to understand your learning involvement they ask topics other than C (like UNIX etc.) 

Puzzles will be involved in their questionnaires...

After all this there will be a dedicated HR round in Which they test your confidence and Communication skills...

All the Best.....

Sedots Placement Papers and Interview Questions

$
0
0

1.
main()
{
int a=2,b=3,c=4;
printf(“%d%d%d”);
}


2.
static int i=25;
Static int i;
main()
{
Static int i;
printf(“%d”,i);
}


3.
struct bitone
{
Int a:3;
Int b:13;
Int c:1;
}bit1;
main()
{
printf(“%d”,sizeof(bit1));
}


4.
main()
{
char *str=NULL;
strcpy(str,”an”);
printf(“str);
}


5.
main()
{
arr[5]={1,2,3,4,5};
printf(“%d”,-2[arr]);
}


6.
main()
{
 char c=’\08’;
printf(“%d”,c);
}


 7.
main()
{
If(0.001-0.1f)
{
printf(“yes\n”);
}
else
{
printf(“No”);
}
}


8.
main()
{
int a=2;
a=˜a+2<<1;
printf(“%d”,a);
}

Technical Questions:

1.Write a program to calculate the size of the structure with out using sizeof?
2.write a program to print your name with out using conditional statements and conditional operators?
3.write a program to calculate sum of the individual digits until it becomes one digit?
(ex:123456 sum is 21 and 21 sum is 3)
4.project description
5.what is virtual pointer
6.program for 7 segment display
7.what is the purpose of constructor
8.diffrences between spi and i2c protocols
9.diffrence between make and make –f
10.what is oops concept

Reference Sites for Online Aptitude Test

$
0
0

Universal Software Analysis tool for ECU networks and distributed systems

$
0
0
CANalyzer is the universal software analysis tool for ECU networks and distributed systems. CANalyzer makes it easy to observe, analyze, and supplement data traffic in CAN, LIN, MOST, or FlexRay systems. With powerful functions and user-programmability, all needs are covered from simple network analysis to advanced troubleshooting of complex problems.

CANalyzer offers intuitive operation from a graphic block diagram, which depicts...
Read more


Other References:

https://www.vector.com/
http://www.vector.com/vi_canalyzer_en.html

VVDN technologies Interview Pattern held on May 2013 | VVDN technologies Interview Questions

$
0
0

Interview Process: 

Written Test:
Aptitude, Basic electronics & C programming 

Interview Experience:

Taken 2 rounds for technical interview which was mostly focused on digital & analog electronics, C programming and basics questions on all embedded topics and two questions on c-programming 

1. Optimized code for multiplications of two numbers without using multiplication operator.
2. Optimized code for expressing a number(n) in binary one's  and displaying it's equivalent in  integer. ( Example: if n = 4, then binary ones's[1111] and the integer equivalent is 15) 
3. More conceptual questions on basic (digital & analog) electronics and logical questions. (Example: Design a circuit when an input and output signals are provided using logic gates with propagation delay )
4. Implementations of logic gates using transistors & diodes. And filters using RLC components. 
5. Questions on OP-AMP

Challenging bug in cpp program - Implementing userdefined string class

$
0
0

#include<iostream>
#include<cstring>
#include<new>
using namespace std;
class string_class
{
char *p;
int len;
public:


========== Empty Constructor ==========

string_class()
{
cout<<"000000000000000000000000000000000\n";
}

========== Single Parameterised Constructor ==========
string_class(const char *str)
{

cout<<"see..in single constructor arg char*...\n";
len=strlen(str);
p=new char[len+1];
strcpy(p,str);
cout<<"see.....\n";
}
string_class(const string_class& str1,const string_class& str2)
{

cout<<"string_class(const string_class& str1,const string_class& str2)"<<"\n";
int len1,len2;
len1=strlen(str1.p);
cout<<"in str1 str2="<<'\n';

len2=strlen(str2.p);
cout<<"len1,len2 is "<<len1<<" "<<len2<<"\n";
cout<<str1.p<<" "<<str2.p<<"\n";
cout<<len1+len2+1<<"\n";
//delete p;
len=len1+len2;
//delete p;
p=(char*)new char[(len+1)];
cout<<"success"<<'\n';
cout<<len1+len2+1<<'\n';
strcpy(p,str1.p);
cout<<p<<"kkk"<<'\n';
strcpy((p+len1),str2.p);
//p9[len1+len2]='\0';
cout<<p<<'\n';
}
==================================================
string_class(const string_class& str1,const char *str2)
{
cout<<"string_class(const string_class& str1,const char *str2)"<<"\n";
int len1,len2;
len1=strlen(str1.p);
len2=strlen(str2);
//delete p;
p=new char[len1+len2+1];

strcpy(p,str1.p);
strcpy((p+len1),str2);
}
==================================================
string_class(const char *str1,const string_class& str2)
{
cout<<"string_class(const char *str1,const string_class& str2)"<<"\n";
int len1,len2;
len1=strlen(str1);
len2=strlen(str2.p);
cout<<"in str1 str2="<<len1<<len2<<"\n";
//delete p;
p=new char[len1+len2+1];
strcpy(p,str1);
strcpy((p+len1),str2.p);
}
==================================================
string_class(const string_class& str1, char ch2)
{
cout<<"string_class(const string_class& str1,const char ch2)"<<'\n';

int len1;
len1=strlen(str1.p);
cout<<"in str1, ch2="<<len1<<"\n";
//delete p;
p=new char[len1+2];
strcpy(p,str1.p);

strcpy((p+len1),&ch2);

p[len1+1]='\0';
cout<<p<<'\n';
}
==================================================
string_class(char ch1,const string_class& str2)
{
cout<<"string_class(const char ch1,const string_class& str2)"<<"\n";
int len2;
len2=strlen(str2.p);
cout<<"in ch1 str2="<<len2<<"\n";
//delete p;
p=new char[len2+2];
strcpy(p,&ch1);
cout<<p<<'\n';
strcpy((p+1),str2.p);
}
==================================================
friend ostream& operator<<(ostream& os, const string_class& str)/////////////////////for object overload cout//////////global friend function///////////
{
os << str.p ;
return os;
}
friend istream& operator>>(istream& os,const string_class& str)/////////////////////for object overload cout//////////global friend function///////////
{os>> str.p;
return os;
}
friend void swaap(string_class& str1,string_class& str2)
{
string_class str3;
str3=str1;
str1=str2;
str2=str3;
}
friend string_class operator+(const string_class& str1,const string_class& str2)
{
cout<<" friend string_class operator+(const string_class& str1, const string_class& str2)"<<'\n';
string_class temp0(str1,str2);
return temp0;
}

==================================================

friend string_class operator+ (const char *str1, const string_class& str2)
{
cout<<"friend string_class operator+ (const char *str1, const string_class& str2)"<<"\n";
string_class temp1(str1,str2);
return temp1;
}
==================================================

friend string_class operator+ (const string_class& str1, const char *str2)
{

cout<<"friend string_class operator+ (const string_class& str1, const char *str2)"<<"\n";
string_class temp2(str1,str2);
cout<<"in str1,str2 funct\n";
return temp2;
}


==================================================
friend string_class operator+ (char ch1, const string_class& str2)
{
cout<<"friend string_class operator+ (const char ch1, const string_class& str2)"<<"\n";
string_class temp3(ch1,str2);
return temp3;
}

==================================================

friend string_class operator+ (const string_class& str1,char ch2)
{
cout<<"friend string_class operator+ (const string_class& str1,const char ch2)"<<"\n";
string_class temp4(str1,ch2);
cout<<"in str1,ch2 funct\n";
return temp4;
}



};

==================================================

main()
{
cout<<"main\n";


string_class str2("shiva");
string_class str4("kumaraswamy ");
string_class str1("ganapathi");
string_class str3,str5;
str3=str2+'U'+str4;
str5=str4;
//ganapathiTshiva
cout<<"in main......................."<<str3;

}

Implementing userdefined string class

Not working in case of str3=str4+'U'+str2;
Getting segmentation fault. Try It Out!


NCR Corporation Interview Process - Held on July 2013 | NCR Corporation Interview Questions

$
0
0

Written test: 

It includes 4 section that covered the following topics
  • C output of programs
  • writing programs in C
  • English section
  • logical question section.
Group discussion : 

There were general topics given followed by 2 min self introduction round.

1st Technical round:

Focused on CPP, questions  like
  1. What are access specifier?
  2. Explain constructor, destructor, friend class,static class , exception handling?
And from C  
Write a program to explain the
  1. Structure concept
  2. Difference between structure and enum
  3. Dynamic memory allocation
  4. Some networking question and project.

2nd technical and HR interview: 
  1. Asked some question on CPP, dynamic library (.dll), link list question, debugging technique,project explanation. 
  2. HR question were like if you are kept in a room for 6 to 7 hr what will you do?, 
  3. If you have deadline for a work and a friend came  for help then  what will you do?, 
  4. Real time example of team work, 
  5. Best moment in life, 
  6. Turnoff time in your life,hobbies etc..

AMI selection procedure - July 2013

$
0
0
SELECTION PROCEDURE:

There were three rounds:

Written test on C and JAVA(objective+programming)

DURATION: 3hrs
PATTERN:


First 20 questions on C(objective) + 2 C programs(mandatory)
C programs Questions are:
  1. Write a program to find out whether the machine follows little or big endian byte ordering.
  2. Write a program to remove extra spaces in a file.

20 questions on JAVA(objective) + 2 JAVA programs(mandatory)

Questions on JAVA programming as follows:
  1. Implement array list.
  2. What is immutive and explain with a program.
  3. 20 questions from aptitude.
  4. 10 questions from IQ.(mandatory).

Written test on C and C++ (theory+programming)
4 reasoning and 15 C and C++ questions and 1 program.

HR round.
  1. Explain personal background
  2. Why should I hire you?
  3. What are your short and long term goals.
  4. What are the qualities should be there in a project manager(as I told my goal is project manager).
  5. Apart from these, basic APTITUDE was also there.
  

DATA PATTERNS INTERVIEW EXPERIENCE - July 2013 | Interview Questions

$
0
0
Interview process is very friendly they check how perfect your are in the concepts

SELECTION PROCESS:

Written test:c (20 questions) and aptitude (20 questions)

Technical round 1:


In first Technical Round they will check basics in
  • C & Data Structures 
  • OS concepts 
  • Micro controller.
Sample Questions: 
  1. What is dead lock?explain with example
  2. What is critical section
  3. What is IPC
  4. Difference b/w pipe and message queue
  5. About exit system call.
C questions:
  1. Wap linked list creation and deletion of node?explain?
  2. What is self referential structure and write it?
  3. Sizeof(void)
  4. Explain about bitwise operators?
  5. What is the use of #include and #define?
  6. Tell me some header files?purpose?
  7. Dynamic memory allocation?write prototype of malloc function?
  8. Wap to test the 7th bit in given hex decimal number using bitwise operators?
  9. Wap to swap 2 numbers using temp variable and without using temp?
Technical round 2:
  1. How much you rate in C?
  2. Programming on linked list?
  3. What is binary tree?
  4. a*b-c+d/e from this expression draw a binary tree and traverse the above in pre-order, post order and in-order?
  5. Sizeof int is architectural dependent or compiler dependent?
  6. Micro controller architecture?
  7. Write client sever program?
  8. Write structure using bit fields?
  9. Wap to Fibonacci series using recursive function?explain?

HR round:
  1. Tell me about your self?
  2. About the company?
  3. What is your goals?
  4. Tell me about your family?
  5. Who is your idle person and why?
  6. If your previous year passed out candidate they ask you the reason for the gap?
  7. If u want to change one thing in your life what is that?
  8. How to prepare for your exams?

Viewing all 129 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>