Gosoft

Gosoft Gosoft is a quality-driven software company. We believe that there is no alternative to quality.

Eid Mubarak!
17/06/2024

Eid Mubarak!

πŸ˜‡Comment down the outputπŸ‘‡πŸΌβ£β£β£β£Follow  Visit : πŸ‘‰ www.gosoft.io πŸ‘ˆβœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨β£β£πŸ‘©β€β€οΈβ€πŸ‘© Share it with your friends⁣⁣⁣Answer: ...
25/05/2024

πŸ˜‡Comment down the outputπŸ‘‡πŸΌβ£β£β£
⁣
Follow
Visit : πŸ‘‰ www.gosoft.io πŸ‘ˆ

✨✨✨✨✨✨✨✨✨✨✨⁣
⁣
πŸ‘©β€β€οΈβ€πŸ‘© Share it with your friends⁣⁣
⁣
Answer: 0

πŸ“Œ a.getFoo() returns 0 which is assigned in the bar, which is further incremented by 1.

πŸ“Œ a.printFoo() simply prints the value of foo (which is 1)

πŸ“Œ Hence we get the output as 0

πŸ“’ Turn on notification⁣⁣
⁣⁣
⁣

⁣
⁣
⁣
⁣
⁣
⁣

πŸ˜‡Comment down the outputπŸ‘‡πŸΌβ£β£β£β£Follow  Visit : πŸ‘‰ www.gosoft.io πŸ‘ˆβœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨β£β£β£πŸ‘©β€β€οΈβ€πŸ‘© Share it with your friends⁣⁣⁣Answer:...
23/05/2024

πŸ˜‡Comment down the outputπŸ‘‡πŸΌβ£β£β£
⁣
Follow
Visit : πŸ‘‰ www.gosoft.io πŸ‘ˆ

✨✨✨✨✨✨✨✨✨✨✨⁣
⁣
⁣
πŸ‘©β€β€οΈβ€πŸ‘© Share it with your friends⁣⁣
⁣
Answer: cbBC

πŸ“Œ NOTE: Destructor calls in reverse order

πŸ“Œ So the constructor of class C will be called first then class B will be called, after that first destructor of class B will be called then class C will be called.

πŸ“Œ Hence we get "cbBC" as the output.

πŸ“’ Turn on notification⁣⁣
⁣⁣
⁣

⁣
⁣
⁣
⁣
⁣
⁣

Comment down the outputπŸ‘‡πŸΌβ£β£β£β£Follow  Visit : πŸ‘‰ www.gosoft.io πŸ‘ˆβœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨β£β£πŸ‘©β€β€οΈβ€πŸ‘© Share it with your friends⁣⁣⁣Answer: 5...
23/05/2024

Comment down the outputπŸ‘‡πŸΌβ£β£β£
⁣
Follow
Visit : πŸ‘‰ www.gosoft.io πŸ‘ˆ

✨✨✨✨✨✨✨✨✨✨✨⁣
⁣
πŸ‘©β€β€οΈβ€πŸ‘© Share it with your friends⁣⁣
⁣
Answer: 51

πŸ“Œ printf("%d", ::var)
Here '::' means we are talking about variable which is out of scope(global variable)
So this statement will print var(global) and returns the number of characters it prints on console(which is 1)
There 5 is printed on the screen by this time. and the value 1 is returned by the printf statement and assigned in the 'var'(local)

πŸ“Œ printf("%d", var++);
This statment will gonna print 1, since there is a post increment.

πŸ“Œ int var = printf("%d", ::var);
printf("%d", var++);

int var = 1; // 5 is printed
printf("%d", var++);

int var = 1; // 5 is printed
print 1

πŸ“Œ Hence we get 51 as the output.

πŸ“’ Turn on notification⁣⁣
⁣⁣
⁣

⁣
⁣
⁣
⁣
⁣
⁣

πŸ˜‡Comment down the outputπŸ‘‡πŸΌβ£β£β£β£Follow  Visit : πŸ‘‰ www.gosoft.io πŸ‘ˆβœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨β£β£βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨β£β£πŸ‘©β€β€οΈβ€πŸ‘© Share it with your frien...
22/05/2024

πŸ˜‡Comment down the outputπŸ‘‡πŸΌβ£β£β£
⁣
Follow
Visit : πŸ‘‰ www.gosoft.io πŸ‘ˆ
✨✨✨✨✨✨✨✨✨✨✨⁣
⁣
✨✨✨✨✨✨✨✨✨✨✨⁣
⁣
πŸ‘©β€β€οΈβ€πŸ‘© Share it with your friends⁣⁣
⁣
Answer: 0

πŸ“Œ Arrays.copyOf() copies the specified array and padded it with new length

πŸ“Œ Since the brr[3] element is not assigned to any value, so its by default value is 0

πŸ“Œ Hence we get 0 as the output

πŸ“’ Turn on notification⁣⁣
⁣⁣
⁣

⁣
⁣
⁣
⁣
⁣
⁣

Comment down the output of the following code without seeing explanation πŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌFollow  Visit : πŸ‘‰ www.gosoft.io πŸ‘ˆ...
22/05/2024

Comment down the output of the following code without seeing explanation πŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌ

Follow
Visit : πŸ‘‰ www.gosoft.io πŸ‘ˆ
✨✨✨✨✨✨✨✨✨✨✨

ANSWER - just swipe

βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–

New post come daily.
Stay tuned⁣
πŸ“’ Turn on notification⁣
βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–

Comment down the output of the following code without seeing explanation πŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌFollow  Visit : πŸ‘‰ www.gosoft.io πŸ‘ˆ...
21/05/2024

Comment down the output of the following code without seeing explanation πŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌ
Follow
Visit : πŸ‘‰ www.gosoft.io πŸ‘ˆ
✨✨✨✨✨✨✨✨✨✨✨⁣

Answer: A

πŸ“Œ NOTE: the variable 'third' declare on line 6 is only accesible throught that block we cannot access it outside that block.

πŸ“Œ That's why the first printf() is giving output 20 - 10 = 10
ans 2nd printf() is giving output 20 + 10 = 30

πŸ“Œ Hence we get "10 30" as the output.

βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–

New post come daily.
Stay tuned⁣
πŸ“’ Turn on notification⁣
βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–

Comment down the output of the following code without seeing explanation πŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌFollow  Visit : πŸ‘‰ www.gosoft.io πŸ‘ˆ...
21/05/2024

Comment down the output of the following code without seeing explanation πŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌ
Follow
Visit : πŸ‘‰ www.gosoft.io πŸ‘ˆ
✨✨✨✨✨✨✨✨✨✨✨⁣

Answer: Bye

πŸ“Œ == operator checks if two variable refer to the same object.

πŸ“Œ Here a and b refers to two different objects. ?: is another form of if else statement that could be read as, condition : if true then do this : else do this.

πŸ“Œ Hence we get "Bye" as the output.

βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–

New post come daily.
Stay tuned⁣
πŸ“’ Turn on notification⁣
βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–

πŸ‘‡πŸ»Comment down Hello World in your favourite programming language.Follow  Visit : πŸ‘‰ www.gosoft.io πŸ‘ˆβœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨β£β£β£New pos...
20/05/2024

πŸ‘‡πŸ»Comment down Hello World in your favourite programming language.

Follow
Visit : πŸ‘‰ www.gosoft.io πŸ‘ˆ
✨✨✨✨✨✨✨✨✨✨✨⁣
⁣⁣
New post come daily.
Stay tuned⁣
πŸ“’ Turn on notification⁣
βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–

πŸ‘©πŸ»β€πŸ’»Share it with your friendsFollow  Visit : πŸ‘‰ www.gosoft.io πŸ‘ˆβœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨βœ¨β£β£β£New post come daily.Stay tunedβ£πŸ“’ Turn on no...
20/05/2024

πŸ‘©πŸ»β€πŸ’»Share it with your friends

Follow
Visit : πŸ‘‰ www.gosoft.io πŸ‘ˆ
✨✨✨✨✨✨✨✨✨✨✨⁣
⁣⁣
New post come daily.
Stay tuned⁣
πŸ“’ Turn on notification⁣
βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–

Comment down the output of the following code without seeing explanation πŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌFollow  Visit : πŸ‘‰ www.gosoft.io πŸ‘ˆ...
19/05/2024

Comment down the output of the following code without seeing explanation πŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌ
Follow
Visit : πŸ‘‰ www.gosoft.io πŸ‘ˆ
✨✨✨✨✨✨✨✨✨✨✨⁣

Answer: 10 40

πŸ“Œ ptr = &a; (pointer ptr starts to point 'a')
ptr = &b; (now pointer ptr starts to point 'b')

πŸ“Œ *ptr = *ptr+*ptr;
This statement is equal to

b = 20 + 20 (since ptr points to b therefore *ptr = b)

πŸ“Œ Hence we get "10 40" as the output.

βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–

New post come daily.
Stay tuned⁣
πŸ“’ Turn on notification⁣
βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–

Comment down the output of the following code without seeing explanation πŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌFollow  Visit : πŸ‘‰ www.gosoft.io πŸ‘ˆ...
19/05/2024

Comment down the output of the following code without seeing explanation πŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌπŸ‘‡πŸΌ
Follow
Visit : πŸ‘‰ www.gosoft.io πŸ‘ˆ

Answer: compilation error

πŸ“Œ In Java if() block expects a boolean value and we are providing an integer value.

πŸ“Œ Hence we get "Compilation error" as the output.

βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–

New post come daily.
Stay tuned⁣
πŸ“’ Turn on notification⁣
βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–

Address

Khustia

Alerts

Be the first to know and let us send you an email when Gosoft posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Contact The Business

Send a message to Gosoft:

Share