Round 1: Online test for 60 minutes. Test consists of questions related to C++ and analytical problems.
Round 2: Technical interview
#include<iostream> using namespace std; #define main xyz int main(int argc,char *argv[]) { main(); return 0; } int xyz() { cout << "hi"; return 0; }Will above program be compiled ? What will be the output ?
struct s { char c; int i; };What is the size of the structure ?
1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6The number of rows can be any.
#include <iostream> using namespace std; int main() { int rows;int n;string space = " "; cout << "Enter Number of rows" << endl; cin >> rows; cout << "rows : "<< rows << endl; for (int t = 1; t <= rows; t++) { for (int i = t; i <= rows; i++) { cout << space; } n = t; for(int j = 1; j <= t; j++) { cout << t; if( n > 1 ) { cout << space; } n--; } for (int k = t; k <= rows; k++) { cout << space; } cout << endl; } return 0; }
This article is contributed by Ashwini Verma. If you like dEexams.com and would like to contribute, you can write your article here or mail your article to admin@deexams.com . See your article appearing on the dEexams.com main page and help others to learn.