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
Select
Add answer anonymously...
Siemens Interview Questions
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+

Reviews

10L+

Interviews

4 Cr+

Salaries

1.5 Cr+

Users

Contribute to help millions

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

Follow Us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Profile Image
Hello, Guest
AmbitionBox Employee Choice Awards 2025
Winners announced!
awards-icon
Contribute to help millions!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
Add office benefits
Add office benefits