An example might help:
if (exp) if (exp2) stmt2 else stmt3
equvalent with this:
if (exp) { if (exp2) stmt2 else stmt 3 }
if that's not what you want, use {braces}:
if (exp) { if (exp2) stmt2 } else stmt3
#include<stdio.h> #include<conio.h> #include<string.h> void main() { int first,last,flag=1; char str[100]; clrscr(); printf("Enter number to get to check wheather palindrome or not"); gets(str); first=0; last=strlen(str)-1; printf("%d",first); printf("%d",last); while(first<=last) { if(str[first]!=str[last]) flag=0; first++; last--; } if(flag==1) { clrscr(); printf("this is palindrome"); getch(); } else { clrscr(); printf("sorry this is not a palindrome"); getch(); } }
In most programming languages, the last subscript (or index) in an array is typically one less than the total number of elements in the array. This is because array indexing usually starts at zero. For example, in an array with 10 elements, the last subscript would be 9.
Popping is the opposite of pushing. You push values into a queue and pop them off. The queue is generally represented by a stack, where the last value pushed onto the stack is the first to be popped off the stack (last in first out, or LIFO).
1. Find the element is the list. Let pointer 'p' point to it. 2. Delete it from the list: if (p->Prev) p->Prev->Next = p->Next; else List->First = p->Next; if (p->Next) p->Next->Prev = p->Prev; else List->Last = p->Prev; 3. Release the memory associated with it.
Handsome numbers are the numbers in which the sum of all the left side numbers is equal to the last number for example 123 - 1+2=3 its a handsome number
The nearest hundredth is the same as two decimal places.
Kelvin, Celsius, and Fahrenheit are the last names of the people who are associated with temperature.
900 When rounding to the nearest hundred, like we did with 850 above, we use the following rules: A) We round the number up to the nearest hundred if the last two digits in the number are 50 or above. B) We round the number down to the nearest hundred if the last two digits in the number are 49 or below. C) If the last two digits are 00, then we do not have to do any rounding, because it is already to the hundred.
No.
113.04 rounded to the nearest unit is 113. Take the last digit of the WHOLE number, in this case, the 3.
Rounded to the nearest ten, 691 becomes 690 as the last number is less than five.
Because the last 7 is larger than 5 and is a ten-thousandth, it is rounded to the nearest thousandth as 54.688
A) We round the number up to the nearest hundred if the last two digits in the number are 50 or above. 8400 is the answer
5600
650 is the least.
a connection from nearest exchange to your home through a line
you round up on a number if the last digit is 5 thru 9 you round down if the last digit is 4 thru 1 therefore 31 rounded to the nearest ten is 30