C language: Question and answer







Que. >> A character variable can store  x characters at a time:

options:
A 1
B 4
C 8
D no limit

Correct answer is : A
Explanation
A character variable is of 1 byte length and can store just 1 character at a time.






C language: question and answer







Que. What is the output of:

#include<stdio.h>
int main()
{
    int x=40;
    {
        int x=20;
        printf("%d",x);
    }
    printf("%d",x);
    return 0;
}

Options:
a 40 40
b 20 40
c 40 20
d error



Answer:

b 20 40

Explainaition:

The variable declared inside the  inner block replaces the x declared in the outer block, hence it prints 20 at 1st printf.
When the inner block ends, the scope of inner x also ends and hence the value of x becomes 40 in the outer block.











A jobless man applied for the position of 'office boy' at Microsoft.





A jobless man applied for the position of 'office boy' at Microsoft.


The HR manager interviewed him, then gave him a test: clean the floor. The man passed the test with flying colors.
"You are hired," HR manager informed the applicant, "give me your e-mail address, and I'll send you the application for employment, as well as the date you should report for work.
The man replied " I don't have a computer, or an email!"
"I'm sorry," said the HR manager. "If you don't have an email, that means you do not exist. And we cannot hire persons who do not exist."
The man was very disappointed.
He didn't know what to do. He only had $10 with him. Once that is spent, he won't have any money to buy any food.
He went to the supermarket and bought a crate of tomatoes with his $10.
He went from door to door and sold the tomatoes in less than two hours. He doubled his money.
He repeated the operation three times, and returned home with $60. He realized that he can survive
this way. He started to go everyday earlier, and return late.
He doubled or tripled his money every day. Soon, he bought a cart, then a truck. In a very short time, he had his own fleet of delivery vehicles.
Five years later, the man became one of the biggest food retailers in the U. S. He started to plan his family's future, and decided to have a life insurance.
He called an insurance broker, and chose a protection plan.
At the end of the conversation, the broker asked him for his email address.
The man replied: ' I don't have an email.'
The broker was dumbfounded. "You don't have an email, and yet have succeeded in building an empire. Can you imagine what you could have been if you had an email?," he exclaimed.
The man thought for a while, and replied, "an office boy at Microsoft!"
If you just lost your Job or Just failed an Interview Don't worry be Optimistic..... Good days are on the way and something better is reserved for you.
--By: Malik Jahangir



Happy Diwali to all Technology Lovers

On Diwali, 

wishes for every joy and prosperity. 
Here's hoping, that the beauty of this festival of lights, bring a world of joy, happiness and contentment to you, to last the whole year through. 

Happy Diwali. 


--My Technology Park