i=20;k=0;
for(j=1;k-i;k+=j<10?4:3)
{
cout<<k;
}
//please comment on the output


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More OOPS Interview Questions

write a program to find the largest of two numbers without using for,while,switch,if else, conditional operator and do while using c++ pgmng language

3 Answers   Satyam,


Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

0 Answers  


Why is oop better than procedural?

0 Answers  


#include <stdio.h> #include <alloc.h> #include <stdlib.h> #include <conio.h> void insert(struct btreenode **, int); void inorder(struct btreenode *); struct btreenode { struct btreenode *leftchild; struct btreenode *rightchild; int data; }; main() { struct btreenode *bt; bt=(struct btreenode *)NULL; int req,i=1,num; clrscr(); printf("Enter number of nodes"); scanf("%d",&req); while(i<=req) { printf("Enter element"); scanf("%d",&num); insert(&bt,num); i++; } inorder(bt); } void insert(struct btreenode **sr, int num) { if(*sr==NULL) { *sr=(struct btreenode *)malloc (sizeof(struct btreenode)); (*sr)->leftchild=(struct btreenode *)NULL; (*sr)->rightchild=(struct btreenode *)NULL; (*sr)->data=num; return; } else { if(num < (*sr)->data) insert(&(*sr)->leftchild,num); else insert(&(*sr)->rightchild,num); } return; } void inorder(struct btreenode *sr) { if(sr!=(struct btreenode *)NULL) { inorder(sr->leftchild); printf("\n %d",sr->data); inorder(sr->rightchild); } else return; } please Modify the given program and add two methods for post order and pre order traversals.

0 Answers  


What is the concept of object oriented program?

6 Answers  






Program to read a comment string

1 Answers   IBM,


what is an qt4 interface?

1 Answers   IBM,


can inline function declare in private part of class?

1 Answers  


Why do we need polymorphism in c#?

0 Answers  


what is the diffrence between c# and c++

5 Answers  


What is the purpose of enum?

0 Answers  


How do you achieve polymorphism?

0 Answers  


Categories