what is the output of below pgm?
void main()
{
int i=0;
if(i)
printf("pass");
else
printf("fail");
}
Answers were Sorted based on User's Feedback
Answer / himanshu goel
fail
because here if is taking 0 boolean value means condition
becomes false and else will be executed
Is This Answer Correct ? | 12 Yes | 0 No |
Answer / srikanth patchava
fail
if check value is thear or not ..if its thear it will got
frist printf other wise it will goto second printf
Is This Answer Correct ? | 0 Yes | 0 No |
You have an int array with n elements and a structure with three int members. ie struct No { unsigned int no1; unsigned int no2; unsigned int no3; }; Point1.Lets say 1 byte in the array element is represented like this - 1st 3 bits from LSB is one number, next 2 bits are 2nd no and last 3 bits are 3rd no. Now write a function, struct No* ExtractNos(unsigned int *, int count) which extracts each byte from array and converts LSByte in the order mentioned in point1.and save it the structure no1, no2, no3. in the function struct No* ExtractNos(unsigned int *, int count), first parameter points to the base address of array and second parameter says the no of elements in the array. For example: if your array LSB is Hex F7 then result no1 = 7, no2 = 2, no3 = 7. In the same way convert all the elements from the array and save the result in array of structure.
An interactive c program to read basic salary of 15 persons. each person gets 25% of basic as HRA, 15%of basic as conveyance allowances, 10%of basic as entertainment allowances.The total salary is calculated by adding basic+HRA+CA+EA.Calculate how many out of 15 get salary above 10,000.Rs also print the salary of each employee
Does c have an equivalent to pascals with statement?
What do you mean by invalid pointer arithmetic?
How do you determine whether to use a stream function or a low-level function?
How important is structure in life?
Explain function?
Difference between strcpy() and memcpy() function?
Do array subscripts always start with zero?
Write a C Program to display the following menu: Menu 1. Display 2. Copy 3. Append 4. Exit Accept the choice (1-4) from the user, and perform the following tasks: Choice 1: Accept a file name from the user and display the file on screen Choice 2: Accept two file names, and copy first file to the second Choice 3: Accept two file names, and append second file to the first file Choice 4: Terminate the program
1 Answers Accenture, Concor, DMU, Satyam, Syntel, Tora,
who is the editor of 'pokemon'?
Tell me when would you use a pointer to a function?