Question Set

1. What will be the output of the program? #include<stdio.h> int main() { int i=1; if(!i) printf("IndiaBIX,"); else { i=0; printf("C-Program"); main(); } return 0; }





Ask Your Doubts Here

Type in
(Press Ctrl+g to toggle between English and the chosen language)

Comments

  • By: guest on 01 Jun 2017 06.01 pm
    Step 1: int i=1; The variable i is declared as an integer type and initialized to 1(one). Step 2: if(!i) Here the !(NOT) operator reverts the i value 1 to 0. Hence the if(0) condition fails. So it goes to else part. Step 3: else { i=0; In the else part variable i is assigned to value 0(zero). Step 4: printf("C-Program"); It prints the "C-program". Step 5: main(); Here we are calling the main() function. After calling the function, the program repeats from step 1 to step 5 infinitely. Hence it prints "C-Program" infinitely.
Show Similar Question And Answers
QA->The program that monitors users activity on internet and transmit that information in background to somewhere else is termed as....
QA->Name the translatory program which translates the high level language into machine language before running the program?....
QA->An unauthorized program which functions from inside what seems to be an authorized program, thereby concealing what it is actually doing:....
QA->An unauthorized program which functions from inside what seems to be an authorized program, thereby concealing what it is actually doing:....
QA->An unauthorized program which functions from inside what seems to be an authorized program, thereby concealing what it is actually doing:....
MCQ->Which of the following statement is correct about the program given below? #include<iostream.h> class IndiaBix { int x, y; public: IndiaBix(int xx = 0, int yy = 0) { x = xx; y = yy; } void Display() { cout<< x << " " << y; } IndiaBix operator +(IndiaBix z) { IndiaBix objTemp; objTemp.x = x + z.x; objTemp.y = y + z.y; return objTemp; } }; int main() { IndiaBix objBix1(90, 80); IndiaBix objBix2(10, 20); IndiaBix objSum; IndiaBix &objRef = objSum; objRef = objBix1 + objBix2; objRef.Display(); return 0; }....
MCQ->What will be the output of the following program? #include<iostream.h> #include<string.h> class IndiaBix { char txtMsg[50]; public: IndiaBix(char str = NULL) { if(str != NULL) strcpy(txtMsg, str); } int BixFunction(char ch); }; int IndiaBix::BixFunction(char ch) { static int i = 0; if(txtMsg[i++] == ch) return strlen((txtMsg + i)) - i; else return BixFunction(ch); } int main() { IndiaBix objBix("Welcome to IndiaBix.com!"); cout<< objBix.BixFunction('t'); return 0; }....
MCQ->Which of the following statement is correct about the program given below? #include<iostream.h> class IndiaBix { int x; public: IndiaBix() { x = 0; } IndiaBix(int xx) { x = xx; } IndiaBix(IndiaBix &objB) { x = objB.x; } void Display() { cout<< x << " "; } }; int main() { IndiaBix objA(25); IndiaBix objB(objA); IndiaBix objC = objA; objA.Display(); objB.Display(); objC.Display(); return 0; }....
MCQ->What will be the output of the program? #include<stdio.h> int i; int fun1(int); int fun2(int); int main() { extern int j; int i=3; fun1(i); printf("%d,", i); fun2(i); printf("%d", i); return 0; } int fun1(int j) { printf("%d,", ++j); return 0; } int fun2(int i) { printf("%d,", ++i); return 0; } int j=1;....
MCQ->What will be the output of the following program? #include<iostream.h> class IndiaBix { public: int x, y; IndiaBix(int xx = 10, int yy = 20) { x = xx; y = yy; } void Exchange(int , int ); }; int main() { IndiaBix objA(30, 40); IndiaBix objB(50); objA.Exchange(&objA.x, &objB.y); cout<< objA.x << " " << objB.y << endl; return 0; } void IndiaBix::Exchange(int x, int y) { int t; t = x; x = y; y = t ; }....
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use | Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions
Question ANSWER With Solution