Asked inSiemens,

If were to write a function to tell if the number is odd or even, how would u code it * The output of the below program is ____ struct base {int a,b; base(); int virtual function1();} struct derv1:base {int b,c,d; derv1() int virtual function1();} struct derv2 : base {int a,e;} base::base() {a=2;b=3;} derv1::derv1() {b=5; c=10;d=11;} base::function1() {return(100);} derv1::function1() {return(200);} main() base ba; derv1 d1,d2; printf("%d %d",d1.a,d1.b)

Be the first one to answer
Add answer anonymously...
Siemens Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter