C plus plus for while loop example code?
The syntax for a for loop is:
for (initialization; condition; increase) {
statement;
}
for example:
int arr[5] = {1, 2, 3, 4, 5};
for (int i = 0; i < 5; i++) {
cout << arr[i] << endl;
// you can do alot more in a for loop than just print to console
}
while loop syntax
while (condition) {
// statements
}
example:
int i = 0;
// the loop will end when i = 5
// unlike for loop you must increment variables yourself or
// use the break command to exit the loop
while (i != 5) {
cout << i << endl;
i++;
}
How would you read int const p?
int const *p declares a 'p' pointer, that points to a constant integer
How records are logically deleted from files?
You might define a boolean field in the record meaning 'this record is logically deleted: yes/no'.
What is a quick way to factor an equation in the form of ax squared plus bx plus c?
== == == ==
* Yahoo! * My Yahoo! * Mail * More Yahoo! Services ** News ** Sports ** Finance ** Entertainment Get Yahoo! Toolbar MakeY!My HomepageGet Yahoo! Toolbar
New User? Sign UpSign InHelp
Yahoo! Searchweb search
* Ask * Answer * Discover
Search for questions: Advanced SearchMy Profile
# Home > # Science & Mathematics > # Mathematics > # Open Question itguru53... ; Member since: : August 20, 2006 ; Total points: : 1247 (Level 3) * Add to My Contacts * Block User
Show me another » = Quick way to factor this polynomial? = 2x^2 + 5x - 33 = 0
What are some quick ways to factor this without listing all possible combinations? * 3 days ago * - 1 day left to answer. Answer Question
Report Abuse
* 0 stars - mark this as Interesting! Be the first person to mark this question as interesting!
* Email * Save ** Add to private Watchlist ** Save to Yahoo! Bookmarks ** Add to My Yahoo! ** Add to Del.icio.us ** RSS
Show:All AnswersOldest to NewestNewest to OldestRated Highest to Lowest
* by dan131m *; Member since: *: December 07, 2007 *; Total points: *: 7690 (Level 5) ** Add to My Contacts ** Block User
Quadratic formula / completing the square ** 3 days ago ** 0 Rating: Good Answer ** 0 Rating: Bad Answer ** Report Abuse
* by Mark *; Member since: *: January 30, 2008 *; Total points: *: 6908 (Level 5) *; Badge Image: *: *; Contributing In: *: Mathematics ** Add to My Contacts ** Block User
(2x + 11)(x - 3)
There are only two combinations: 1 and 33 or 3 and 11. Only one way to get a 2 (1)(2)
You start with (2x + __)( x - __)
Now use logic. Since 5 is small, you need two factrs of 33 that are fairly close, namely 3 and 11 (closer that 1 and 33). Done. ** 3 days ago ** 0 Rating: Good Answer ** 0 Rating: Bad Answer ** Report Abuse
* by RichardH *; Member since: *: April 27, 2009 *; Total points: *: 4291 (Level 4) ** Add to My Contacts ** Block User
Sure the key is the b term +5. Your job is to separate the factors of 33 in such a way that 2 times one factor yields a difference of 5 whan the "i" & "o" terms are added together. Sooo, 3+11 seem to do the trick
(2x+11)(x-3)=0 ** 3 days ago ** 0 Rating: Good Answer ** 0 Rating: Bad Answer ** Report Abuse
* by norman *; Member since: *: August 26, 2007 *; Total points: *: 24514 (Level 6) *; Badge Image: *: *; Contributing In: *: Mathematics ** Add to My Contacts ** Block User
use the quad formula
x = (-5 +/- sqrt(25 + 264))/4 = (-5+/- 17)/4 = -11/2 or 3
listing the factor of 66 is just as easy in this case, -6 +11
(2x +11)(x - 3) = 0
x = -11/2 or 3 ** 3 days ago ** 0 Rating: Good Answer ** 0 Rating: Bad Answer ** Report Abuse
* by Pothana *; Member since: *: August 14, 2009 *; Total points: *: 119 (Level 1) ** Add to My Contacts ** Block User
2x^2 + 5x - 33 = 0
What I do is:
- Make a big 'X'
- On the top, write '-66' [co-efficient of 'x^2' multiplied by the last number]
- On the bottom, write '5' [co-efficient of 'x']
- Now... Find two numbers that multiply to -66 and add to 5
Numbers: 11 and -6
Now re-write the question as:
2x^2 -6x + 11x - 33 = 0 [Take '2x' common; Take '11' common]
2x(x - 3) + 11(x - 3) = 0 [Take '(x - 3)' common]
(x - 3) (2x + 11) = 0
Now... Solve for 'x'
Make two different equations --
(x - 3) = 0 and (2x + 11) = 0
First equation --
(x - 3) = 0
x - 3 = 0
x = 3 [One answer]
Second equation --
(2x + 11) = 0
2x + 11 = 0
2x = -11
x = -11/2 [Second answer]
Answers:
x = 3
x = -11/2 My work ** 3 days ago ** 0 Rating: Good Answer ** 0 Rating: Bad Answer ** Report Abuse
* by Basanta *; Member since: *: August 08, 2009 *; Total points: *: 91 (Level 1) ** Add to My Contacts ** Block User
2x^2+11x -6x-33=0 :x[2x+11]-3[2x+11]=0 ;[x-3][2x+11]=0 x-3=0 and2x+11=0 x=3 and x=-11/2 ** 3 days ago ** 0 Rating: Good Answer ** 0 Rating: Bad Answer ** Report Abuse
* by Jun Agruda *; Member since: *: May 17, 2007 *; Total points: *: 82867 (Level 7) *; Badge Image: *: *; Contributing In: *: Mathematics ** Add to My Contacts ** Block User ** Best answer 25% ** 17401 answers *; Badge Image: *: *; Contributing In: *: Mathematics *; Member Since: *: May 17, 2007 *; Total Points: *: 82867 (Level 7) *; Points earned this week: *: 39
** Add to My Contacts ** Block User
2x² + 5x - 33 = 0
2x² + 5x = 33
x² + 5/2x = 33/2
x² + 5/4x = 33/2 + (5/4)²
x² + 5/4x = 264/16 + 25/16
(x + 5/4)² = 289/16
x + 5/4 = ± 17/4
Factors starting from the last line above:
= x + 5/4 - 17/4, = x - 12/4, = x - 3
= x + 5/4 + 17/4, = x + 22/4, = x + 11/2, = 2x + 11
Answer: (x - 3)(2x + 11)-there's no shorter way I could think of.
Proof:
= (x - 3)(2x + 11)
= x(2x) + x(11) - 3(2x) - 3(11)
= 2x² + 11x - 6x - 33
= 2x² + 5x - 33 ** 2 days ago ** 0 Rating: Good Answer ** 0 Rating: Bad Answer ** Report Abuse
Graphical Prime Factorization
Wednesday, July 20th, 2005 Every so often I like to waste a lot of time trying to solve some practically impossible math problem, like finding a simple proof to Fermat's Last Theorem or proving Goldbach's Conjecture. These days I'm trying to find a quick way to factor numbers by using graphs to gain insights. (Unlike the other problems, solving this one would put me in an interesting dilemma about how to publish the solution.)Trial division is the most basic technique for factoring numbers. You just go through candidate factors, dividing each one into the number to be factored and getting a yes/no for each candidate. My thought was to look at the result of the division (not just yes/no) and use that to decide how far to skip ahead for selecting the next candidate. The first graph shows trial divisions of the number 3341287, which is the product of two primes, 2087 and 1601. The candidate factors start at the square root of n and increase along the horizontal axis. The remainders are on the vertical axis. You can definitely see patterns in the remainders, and it turns out the points lie on "concentric" quadratic curves. The equations for the curves are all of the form: x^2 - m*x + n, for some integer m. We can factor the quadratic into (x-a)(x-b) where n=ab and m=a+b, but that doesn't help since n=ab is what we're trying to solve in the first place. However, since each curve covers multiple points, we can reduce our work by iterating over m and solving each quadratic instead of iterating over each x. Unfortunately successive curves cover fewer and fewer factors, and soon it doesn't help at all. We might also try to solve the general quadratic. Using the quadratic formula we end up with something of the format k^2-n under the radical (where 2k=m), which means all we have to do is find a k that makes the square root an integer, or in other words an integer solution to k^2 - n = p^2, or k^2 - p^2 = n, or (k-p)(k+p) = n, but then we're back where we started trying to factor n. The second graph is the same as the first, but with a wider domain of x. Other interesting quadratics start to appear. In all graphs the red line represents y=x. The technique of using the quadratics to skip candidates is basically the same as Fermat's factorization method, except with a graphically inspired derivation. Fermat started where I ended, noticing that any odd number could be written as (k-p)(k+p) and then trying to find solutions by starting k at the square root of n and checking if each k^2 - n is a perfect square. The last graph shows the remainders for the x values corresponding to the Fermat trial divisors. I think each "Fermat point" represents a quadratic curve from above, using the point with the maximum remainder (or 0 remainder). The green line is at y=n/x, and I'm not sure why all the non-trivial Fermat remainders are above it. So iterating through quadratics is really the same as Fermat's method, and we haven't gained anything, but what about the patterns in the Fermat remainders themselves? Looks like there are some quadratics there as well and maybe we can use the same idea to reduce the number of Fermat points we examine. I've found that the quadratics are generally of the form x^2 - a/b * x + n/b, where b has been a small integer in my tests. I haven't gone much further - there needs to be a way of iterating through these quadratics with confidence of convering all the candidate factors. Then again, even if only most of the candidates are covered, there's some chance of finding a factor quicker. At best, any attempt to use those quadratics will surely also be duplicating optimizations that have already be made to Fermat's method. For instance, there is a method of re-centering the search by multiplying n by some number to offset the problem of diminishing returns once you get far from the "center", and that sounds a lot like using the quadratics that have another center point.
How do you convert Dotted Decimal 121.55.7.15 to Binary?
Each number separated by a dot is an eight bit number, so conversion requires converting four numbers. To convert a decimal number to binary, divide by two in succession until the number zero is reached.
121 / 2 = 60 r 1
60 / 2 = 30 r 0
30 / 2 = 15 r 0
15 / 2 = 7 r 1
7 / 2 = 3 r 1
3 / 2 = 1 r 1
1 / 2 = 0 r 1
Then, you read remainders backwards:
1111001
If there's less than 8 numbers, add zeroes to the left:
01111001
Then, do this for the other numbers.
55 / 2 = 22 r 1
22 / 2 = 11 r 0
11 / 2 = 5 r 1
5 / 2 = 2 r 1
2 / 2 = 1 r 0
1 / 2 = 0 r 1
00101101
7 / 2 = 3 r 1
3 / 2 = 1 r 1
1 / 2 = 0 r 1
00000111
15 / 2 = 7 r 1
7 / 2 = 3 r 1
3 / 2 = 1 r 1
1 / 2 = 1 r 1
00001111
Once you have all the binary digits, simply stick them back together using dots:
01111001.00101101.00000111.00001111
How do you type c with accent?
Use charmap.exe, (you can use these characters: ĆĈĊČ, and many others)
How many bytes required for int float double char boolean?
Int: 4 bytes
Float: 4
double: 8
char: 1
boolean: 1
What is the difference between 'while' and 'when'?
What is asking about something -- what is your name
When is asking about time date -- when were you born
I have left the question marks(?) off the questions because Wiki answers doesn't like answers with questions
Example of ATM programing by turbo c?
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<stdlib.h>
#define pf printf
#define s scanf
int gd=DETECT, gm, pa, o, b;
int i;
int x, y, i,ch,c;
int c, m, p, qn, cm, mp, cp, cmp, n, k, p1, g,qcm,qmp,qcp,qc,qm,qp;
void main()
{
initgraph(&gd,&gm," ");
cleardevice();
line(0,0,639,0);
line(0,0,0,479);
line(639,0,639,479);
line(639,479,0,479);
line(589,479,0,479);
randomize();
for(i=0;i<640;i++)
{
setcolor(i);
x=rand()%639;
y=rand()%480;
putpixel
(x,y,i);
{
setcolor(RED);
settextstyle(3,0,5);
outtextxy(60,100, "PROJECT IN DISCRETE");
setcolor(RED);
settextstyle(3,0,5);
outtextxy(80,135, "MATHEMATICS");
setcolor(i);
settextstyle(2,0,5);
outtextxy(120,192,"SUBMITTED BY :");
setcolor(i);
settextstyle(2,0,5);
outtextxy(120,202,"Cabrera");
setcolor(i);
settextstyle(2,0,5);
outtextxy(120,214,"Gaspar");
setcolor(i);
settextstyle(2,0,5);
outtextxy(120,226,"Molina");
setcolor(i);
settextstyle(2,0,5);
outtextxy(120,238,"Viray");
}
setcolor(i);
settextstyle(2,0,5);
outtextxy(400,350,"U P L O A D i N G...");
setcolor(WHITE);
outtextxy(i,378,"=");
outtextxy(i,406,"=");
setcolor(WHITE);
circle(i,400,10);
delay(1);
}
cleardevice();
gotoxy(10,7);
pf("Enter 1 for V E N N D I A G R A M ");
gotoxy(10,8);
pf("Enter 2 for S E T N O T A T I O N");
gotoxy(10,10);
printf("Input: ");
s("%d",&pa);
cleardevice();
{
if(pa==1)
{ {
line(0,0,639,0);
line(0,0,0,479);
line(639,0,639,479);
line(639,479,0,479);
line(589,479,0,479);
randomize();
for(i=0;i<640;i++)
{
setcolor(i);
x=rand()%639;
y=rand()%480;
putpixel
(x,y,i);
{
setcolor(i);
settextstyle(9,0,5);
outtextxy(60,100, "V E N N");
setcolor(i);
settextstyle(9,0,5);
outtextxy(80,165, "D I A G R A M");
}
setcolor(i);
settextstyle(2,0,5);
outtextxy(400,350,"U P L O A D i N G...");
setcolor(YELLOW);
outtextxy(i,378,"=");
outtextxy(i,406,"=");
setcolor(WHITE);
circle(i,400,10);
delay(1);
}
sleep(1);
cleardevice();
}
gotoxy(10,7);
pf("Enter 1 if the Outside is missing. 3 Circle. ");
gotoxy(10,8);
pf("Enter 2 if the Total is missing. 3 Circle.");
gotoxy(10,11);
printf("Choice : ");
s("%d",&p1);
for(g=1;g<=8;g++)
{ if(p1==1)
{
cleardevice();
gotoxy(32,8);
pf("Input the Values for the following variables:");
gotoxy(32,11);
pf("X:");
gotoxy(32,12);
pf("Y:");
gotoxy(32,13);
pf("Z:");
gotoxy(32,14);
pf("XY:");
gotoxy(32,15);
pf("XZ:");
gotoxy(32,16);
pf("YZ:");
gotoxy(32,17);
pf("XYZ:");
gotoxy(32,18);
pf("Outside:");
gotoxy(32,19);
pf("Total Number:");
{
if(g==1){gotoxy(42,18);pf("----");gotoxy(42,11);s("%d",&c);}
if(g==2){gotoxy(42,18);pf("----");gotoxy(42,11);pf("%d",c);gotoxy(42,12);s("%d",&m);}
if(g==3){gotoxy(42,18);pf("----");gotoxy(42,11);pf("%d",c);gotoxy(42,12);pf("%d",m);gotoxy(42,13);s("%d",&p);}
if(g==4){gotoxy(42,18);pf("----");gotoxy(42,11);pf("%d",c);gotoxy(42,12);pf("%d",m);gotoxy(42,13);pf("%d",p);gotoxy(42,14);scanf("%d",&cm);}
if(g==5){gotoxy(42,18);pf("----");gotoxy(42,11);pf("%d",c);gotoxy(42,12);pf("%d",m);gotoxy(42,13);pf("%d",p);gotoxy(42,14);pf("%d",cm);gotoxy(42,15);s("%d",&cp);}
if(g==6){gotoxy(42,18);pf("----");gotoxy(42,11);pf("%d",c);gotoxy(42,12);pf("%d",m);gotoxy(42,13);pf("%d",p);gotoxy(42,14);pf("%d",cm);gotoxy(42,15);pf("%d",cp);gotoxy(42,16);s("%d",&mp);}
if(g==7){gotoxy(42,18);pf("----");gotoxy(42,11);pf("%d",c);gotoxy(42,12);pf("%d",m);gotoxy(42,13);pf("%d",p);gotoxy(42,14);pf("%d",cm);gotoxy(42,15);pf("%d",cp);gotoxy(42,16);pf("%d",mp);gotoxy(42,17);s("%d",&cmp);}
if(g==8){gotoxy(42,18);pf("----");gotoxy(42,11);pf("%d",c);gotoxy(42,12);pf("%d",m);gotoxy(42,13);pf("%d",p);gotoxy(42,14);pf("%d",cm);gotoxy(42,15);pf("%d",cp);gotoxy(42,16);pf("%d",mp);gotoxy(42,17);pf("%d",cmp);gotoxy(50,19);s("%d",&k);}
cleardevice();
}}
{ qcm=cm-cmp;
qmp=mp-cmp;
qcp=cp-cmp;
qc=c-(qcp+cmp+qcm);
qm=m-(qcm+cmp+qmp);
qp=p-(qcp+cmp+qmp);
qn=k-(cmp+qcp+qcm+qmp+qc+qm+qp);
}
cleardevice();
setcolor(RED);
rectangle(600,450,40,40);
setcolor(YELLOW);
circle(250,200,125);
setcolor(GREEN);
circle(375,200,125);
setcolor(BLUE);
circle(313,300,125);
gotoxy(39,15);
printf("%d",cmp);
gotoxy(30,4);
printf("X");
gotoxy(49,4);
printf("Y");
gotoxy(23,12);
printf("%d",qc);
gotoxy(55,12);
printf("%d",qm);
gotoxy(39,23);
printf("%d",qp);
gotoxy(39,9);
printf("%d",qcm);
gotoxy(30,18);
printf("%d",qcp);
gotoxy(49,18);
printf("%d",qmp);
gotoxy(63,25);
printf("%d",qn);
gotoxy(39,27);
setcolor(WHITE);
outtextxy(310,435,"Z");
}
for(g=1;g<=8;g++)
{
if(p1==2)
{cleardevice();
gotoxy(32,8);
pf("Input the Values for the following variables:");
gotoxy(32,11);
pf("X:");
gotoxy(32,12);
pf("Y:");
gotoxy(32,13);
pf("Z:");
gotoxy(32,14);
pf("XY:");
gotoxy(32,15);
pf("XZ:");
gotoxy(32,16);
pf("YZ:");
gotoxy(32,17);
pf("XYZ:");
gotoxy(32,18);
pf("Outside:");
gotoxy(32,19);
pf("Total Number:");
{
if(g==1){gotoxy(42,19);pf("----");gotoxy(42,11);s("%d",&c);}
if(g==2){gotoxy(42,19);pf("----");gotoxy(42,11);pf("%d",c);gotoxy(42,12);s("%d",&m);}
if(g==3){gotoxy(42,19);pf("----");gotoxy(42,11);pf("%d",c);gotoxy(42,12);pf("%d",m);gotoxy(42,13);s("%d",&p);}
if(g==4){gotoxy(42,19);pf("----");gotoxy(42,11);pf("%d",c);gotoxy(42,12);pf("%d",m);gotoxy(42,13);pf("%d",p);gotoxy(42,14);scanf("%d",&cm);}
if(g==5){gotoxy(42,19);pf("----");gotoxy(42,11);pf("%d",c);gotoxy(42,12);pf("%d",m);gotoxy(42,13);pf("%d",p);gotoxy(42,14);pf("%d",cm);gotoxy(42,15);s("%d",&cp);}
if(g==6){gotoxy(42,19);pf("----");gotoxy(42,11);pf("%d",c);gotoxy(42,12);pf("%d",m);gotoxy(42,13);pf("%d",p);gotoxy(42,14);pf("%d",cm);gotoxy(42,15);pf("%d",cp);gotoxy(42,16);s("%d",&mp);}
if(g==7){gotoxy(42,19);pf("----");gotoxy(42,11);pf("%d",c);gotoxy(42,12);pf("%d",m);gotoxy(42,13);pf("%d",p);gotoxy(42,14);pf("%d",cm);gotoxy(42,15);pf("%d",cp);gotoxy(42,16);pf("%d",mp);gotoxy(42,17);pf("%d",cmp);gotoxy(42,18);s("%d",&n);}
cleardevice();
}}
{ qcm=cm-cmp;
qmp=mp-cmp;
qcp=cp-cmp;
qc=c-(qcp+cmp+qcm);
qm=m-(qcm+cmp+qmp);
qp=p-(qcp+cmp+qmp);
qn=k-(cmp+qcp+qcm+qmp+qc+qm+qp);
}
cleardevice();
setcolor(RED);
rectangle(600,450,40,40);
setcolor(YELLOW);
circle(250,200,125);
setcolor(GREEN);
circle(375,200,125);
setcolor(BLUE);
circle(313,300,125);
gotoxy(39,15);
printf("%d",cmp);
gotoxy(30,4);
printf("X");
gotoxy(49,4);
printf("Y");
gotoxy(23,12);
printf("%d",qc);
gotoxy(55,12);
printf("%d",qm);
gotoxy(39,23);
printf("%d",qp);
gotoxy(39,9);
printf("%d",qcm);
gotoxy(30,18);
printf("%d",qcp);
gotoxy(49,18);
printf("%d",qmp);
gotoxy(63,25);
printf("%d",qn);
gotoxy(39,27);
setcolor(WHITE);
outtextxy(310,435,"Z");
}
}
getche();
}
{
if(pa==2)
{
{
line(0,0,639,0);
line(0,0,0,479);
line(639,0,639,479);
line(639,479,0,479);
line(589,479,0,479);
randomize();
for(i=0;i<640;i++)
{
setcolor(i);
x=rand()%639;
y=rand()%480;
putpixel
(x,y,i);
{
setcolor(i);
settextstyle(9,0,5);
outtextxy(60,100, "S E T");
setcolor(i);
settextstyle(9,0,5);
outtextxy(50,165, "N O T A T I O N");
}
setcolor(i);
settextstyle(2,0,5);
outtextxy(400,350,"U P L O A D i N G...");
setcolor(YELLOW);
outtextxy(i,378,"=");
outtextxy(i,406,"=");
setcolor(WHITE);
circle(i,400,10);
delay(1);
}
sleep(1);
cleardevice();
}
printf("ogi");
getche();
}
}
cleardevice();
gotoxy(10,10);
printf("--END--");
getche();
}
Can you perform insertion and deletion in an array?
You can, but it's not as straightforward as inserting or deleting from a list. This is simply because arrays are not intended for insertions or deletions other than at the end of the array. This is because an insertion requires that the entire array be reallocated (which may require the array to be copied in its entirety) simply in order to make room for the new element, which can then simply be inserted in the unused element at the end of the new array. To insert elsewhere in the array, all the elements following the insertion point need to be copied (for a second time) into the next element, starting with the last used element. the entire process can prove quite costly, especially if the elements are complex objects which would require their copy constructors to be invoked at least once and possibly twice. This is why it is generally better to use arrays of pointers to objects rather than arrays of objects, as copying a pointer is more efficient than copying an object. However, if your array undergoes frequent resizing in order to accommodate insertions and deletions, then you really would be better off using a list.
To avoid making a definite statement?
One can use language that expresses uncertainty or possibility, such as using words like "may," "might," "could," or "potential." By using these types of words, it allows for flexibility and avoids making a definitive statement. Additionally, using conditional language like "if," "unless," or "depending on" can also help to avoid making a definite statement.
How do you use logic inside switch statement?
Nothing special, eg:
switch (c) {
case 'A':
/* use any 'logic' you want */
break;
default:
/* use any 'logic' you want */
}
A loop tool is used to smooth and model clay into shape. The tool has a wooden handle and a metal loop at the end that can come in different sizes.
What is difference between conditional operator and bitwise operator?
A binary operator is simply an operator that has two parts, written to the left and to the right of the operator, e.g.:
1 + 2
The binary operator can be a logical operator ("and", "or", "xor", etc. - but "not" is a unary operator), or it can be in some other category, like the arithmetic operator shown above.
A binary operator is simply an operator that has two parts, written to the left and to the right of the operator, e.g.:
1 + 2
The binary operator can be a logical operator ("and", "or", "xor", etc. - but "not" is a unary operator), or it can be in some other category, like the arithmetic operator shown above.
A binary operator is simply an operator that has two parts, written to the left and to the right of the operator, e.g.:
1 + 2
The binary operator can be a logical operator ("and", "or", "xor", etc. - but "not" is a unary operator), or it can be in some other category, like the arithmetic operator shown above.
A binary operator is simply an operator that has two parts, written to the left and to the right of the operator, e.g.:
1 + 2
The binary operator can be a logical operator ("and", "or", "xor", etc. - but "not" is a unary operator), or it can be in some other category, like the arithmetic operator shown above.
What is the use of time.h in c?
The time.h include file is a header file for a library of standard time and date manipulation routines. For example...
#include <stdio.h>
#include <time.h>
int main (int argc, char ** argv) {
time_t tt = time(NULL);
printf ("The date and time is %s", asctime(localtime(&tt)));
return 0;
}
Any possible binary logic function can be implemented using only?
AND and NOT; OR and NOT; EQU and NOT; XOR