class test
{
int a;
public:
test(int b):a(b){}
void show(){
cout<<a;
}
};
void main()
{
test t1;
test t2(5);
t1.show();
t2.show();
}
}
Write a C program to enter 10 integer numbers through one variable and count how many of them are even using while loop ?
write a profram for selection sort whats the error in it?
void main() { int i=5; printf("%d",i+++++i); }
How to create a program that lists countries capitals when country is entered? (Terribly sorry, I'm a complete novist to coding with C, am looking for inspiration and general tips on how to code and create this program.)
Find the error (2.5*2=5) (a) X=y=z=0.5,2.0-5.75 (b) s=15;
void main() { int i=1; printf("%d%d%d",i,++i,i++); } Cau u say the output....?
Assume that the int variables i and j have been declared, and that n has been declared and initialized. Write code that causes a "triangle" of asterisks of size n to be output to the screen. Specifically, n lines should be printed out, the first consisting of a single asterisk, the second consisting of two asterisks, the third consistings of three, etc. The last line should consist of n asterisks. Thus, for example, if n has value 3, the output of your code should be * ** *** You should not output any space characters. Hint: Use a for loop nested inside another for loop.
when i use cout or cin call & then either << or >> .....it shows declaration syntax error...what should i do? cout<<"anything"; int a; cin>>a; return 0;
I am using Qt 5.6 during compilation it stops and gives error about Qmake The process "C:QtQt5.6.35.6.3msvc2015_64inqmake.exe" crashed. Error while building/deploying project untitled1 (kit: Desktop Qt 5.6.3 MSVC2015 64bit) When executing step "qmake"
loop1: { x=i<n?(i++):0; printf("%d",i); exit(x); continue; } Error- misplaced continue. Doubt-1.will the exit(x) be executed for all values of x 2.will this statement go out of the program.
How to develop a program using C language to convert 8-bit binary values to decimals. TQ
Write down the difference between c. Loop and goto statement d. (!0) and (!1) e. (1= =! 1) and (1!=1) f. NULL and !NULL