Hi Everyone,
Can you tell me what is the exact usage of environment variables in windows? Why do we require? How does operating system make use of those variables? When we install an...
Type: Posts; User: rmsece; Keyword(s):
Hi Everyone,
Can you tell me what is the exact usage of environment variables in windows? Why do we require? How does operating system make use of those variables? When we install an...
#include<stdio.h>
#include<conio.h>
int main()
{
static int i=0;
i++;
if(i<101)
{
printf("%d\n",i);
main();
Hi all,
Can anyone tell what is the use of string class over stringBuilder? Even,static strings can be handled by stringBuilder. Obviously,since string class is immutable,we are going for...
The question is wrong. else(condition) is impossible, it should be
if(condition)
printf("hello");
else
printf("world");
My answer is:
condition : (!(printf("hello")); printf returns...
Hi morla,
Your answer is correct,But think about the time taken for the execution...If we give some large input to the program(5 digits),the loop subtracts 9 from the number till it...
hi aman,
it will be 601 and 506...In (i), for every value of row,inner loop checks condition for 6 times (5 times column value gets satisfied,last time failed)...so,totally 100*6=600...After...
1344 is the right answer...alokkrbhatt's approach is correct. But,the array starts with [1][1] instead of
[0][0],so he missed to arrive the right answer... Think in terms of rows and...
Try this...Enter number,number should be greater than 0...
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
int d;
void main()
{
char *num;
clrscr();
try this...recursive program,if is conditional statement and not a loop,so u could use this probably...
void main()
{
static int i=1;
if(i<=10)
{
printf("%d ",i);
dim a as double=1.00001
dim b as double
b=math.ceiling(a)
MsgBox(b)
regards,
rms...
You can have two pointers p,q pointing to the header node...Inside a while loop you move the second pointer by two nodes and first pointer by one node...if loop exists,definitely the two pointers...
assume n numbers in both sets a and b(array is taken as a set,so,two arrays)...a and b are the sets...c is the resultant set...
for(i=0;i<=n-1;i++)
{
c[i]=a[i]*b[i]
}
regards,
rms...
Hi,The second way will not work properly when the variables a or b equal to zero,another one problem is that if "a*b" exceeds integer range, it will give unexpected results.
ya,correct,its for integer variables only...But we dont use temporary varibles explicitly...
why do you need three variables? you can do it in two variables itself...
cout<< ( (a>b)*a + (b>a) *b)
cout <<"is big"
fine...you can use a single statement to swap two numbers without the use of temporary variable...
a^=b^=a^=b
regards rms...
without operators impossible...use this logic for small positive numbers...It needs just 16 iterations,repeated addition will take some time...so this one is good...a and b are two inputs,sum is the...
#include<stdio.h>
#include<conio.h>
void main()
{
int a[15];
int i,j,n;
scanf("%d",&n); /* size of the array */
for(i=0;i<n;i++)
scanf("%d",a[i]);
for(i=0;i<=-1;i++)