Monday 28 October 2013

C Program for the Implementation of a Simple Text Editor with featuress like Insertion, Deletion | CS1207 - System Software Laboratory

AIM:
      To write a "C" program to implement "Text Editor" with features like insertion, deletion in CS1207 - System Software Lab.

ALGORITHM:

1.Display options new, open and exit and get choice.
2.If choice is 1 , call Create() function.
3.If choice is 2, call Display() function.
4.If choice is 3, call Append() function.
5.If choice is 4, call Delete() function.
6.If choice is 5, call Display() function.
7.Create()
    7.1 Get the file name and open it in write mode.

    7.2 Get the text from the user to write it.
8.Display()
    8.1 Get the file name from user.
    8.2 Check whether the file is present or not.
    8.2 If present then display the contents of the file.
9.Append()
    9.1 Get the file name from user.
    9.2 Check whether the file is present or not.
    9.3 If present then append the file by getting the text to add with the existing file.
10. Delete()
    10.1 Get the file name from user.
    10.2 Check whether the file is present or not.
    10.3 If present then delete the existing file.

SOURCE CODE:

#include<stdio.h>
#include<conio.h>
#include<process.h>
int i,j,ec,fg,ec2;
char fn[20],e,c;
FILE *fp1,*fp2,*fp;
void Create();
void Append();
void Delete();
void Display();
void main()
{
 do {
  clrscr();
  printf("\n\t\t***** TEXT EDITOR *****");
  printf("\n\n\tMENU:\n\t-----\n ");
  printf("\n\t1.CREATE\n\t2.DISPLAY\n\t3.APPEND\n\t4.DELETE\n\t5.EXIT\n");
  printf("\n\tEnter your choice: ");
  scanf("%d",&ec);
  switch(ec)
  {
   case 1:
     Create();
     break;
   case 2:
     Display();
     break;
   case 3:
     Append();
     break;
   case 4:
     Delete();
     break;
   case 5:
     exit(0);
  }
 }while(1);
}
void Create()
{
 fp1=fopen("temp.txt","w");
 printf("\n\tEnter the text and press '.' to save\n\n\t");
 while(1)
 {
  c=getchar();
  fputc(c,fp1);
  if(c == '.')
  {
   fclose(fp1);
   printf("\n\tEnter then new filename: ");
   scanf("%s",fn);
   fp1=fopen("temp.txt","r");
   fp2=fopen(fn,"w");
   while(!feof(fp1))
   {
    c=getc(fp1);
    putc(c,fp2);
   }
   fclose(fp2);
   break;
  }}
}
void Display()
{
  printf("\n\tEnter the file name: ");
  scanf("%s",fn);
  fp1=fopen(fn,"r");
  if(fp1==NULL)
  {
   printf("\n\tFile not found!");
   goto end1;
  }
  while(!feof(fp1))
  {
   c=getc(fp1);
   printf("%c",c);
  }
end1:
  fclose(fp1);
  printf("\n\n\tPress any key to continue...");
  getch();
}
void Delete()
{
  printf("\n\tEnter the file name: ");
  scanf("%s",fn);
  fp1=fopen(fn,"r");
  if(fp1==NULL)
  {
   printf("\n\tFile not found!");
   goto end2;
  }
  fclose(fp1);
  if(remove(fn)==0)
  {
   printf("\n\n\tFile has been deleted successfully!");
   goto end2;
  }
  else
   printf("\n\tError!\n");
end2: printf("\n\n\tPress any key to continue...");
  getch();
}
void Append()
{
  printf("\n\tEnter the file name: ");
  scanf("%s",fn);
  fp1=fopen(fn,"r");
  if(fp1==NULL)
  {
   printf("\n\tFile not found!");
   goto end3;
  }
  while(!feof(fp1))
  {
   c=getc(fp1);
   printf("%c",c);
  }
  fclose(fp1);
  printf("\n\tType the text and press 'Ctrl+S' to append.\n");
  fp1=fopen(fn,"a");
  while(1)
  {
   c=getch();
   if(c==19)
    goto end3;
   if(c==13)
   {
    c='\n';
    printf("\n\t");
    fputc(c,fp1);
   }
   else
   {
    printf("%c",c);
    fputc(c,fp1);
   }
  }
end3: fclose(fp1);
  getch();
}

Implementation of a Single Pass Macro Processor using C programming..

Single Pass Macro Processor


/* Macro Processor */

#include<stdio.h>
#include<conio.h>
#include<ctype.h>
#include<string.h>
int m=0,i,j,flag=0;
char c,*s1,*s2,*s3,*s4,str[50]=" ",str1[50]=" ";
char mac[10][10];
void main()
{
FILE *fpm=fopen("macro.txt","r");
FILE *fpi=fopen("minput.txt","r");
FILE *fpo=fopen("moutput.txt","w");
clrscr();
while(!feof(fpm))
{
fgets(str,50,fpm);
s1=strtok(str," ");
s2=strtok(NULL," ");
if(strcmp(s1,"MACRO")==0)
{
strcpy(mac[m],s2);
m++;
}
s1=s2=NULL;
}
fgets(str,50,fpi);
while(!feof(fpi))
{
flag=0;
strcpy(str1,str);
for(i=0;i<m;i++)
{
if(strcmp(str1,mac[i])==0)
{
rewind(fpm);
while(!feof(fpm))
{
fgets(str,50,fpm);
s2=strtok(str," ");
s3=strtok(NULL," ");
if(strcmp(s2,"MACRO")==0&&strcmp(s3,str1)==0)
{
fgets(str,50,fpm);
strncpy(s4,str,4);
s4[4]='\0';
while(strcmp(s4,"MEND")!=0)
{
fprintf(fpo,"%s",str);
printf("\n####%s",str);
fgets(str,50,fpm);
strncpy(s4,str,4);
s4[4]='\0';
}
}
}
flag=1;
break;
}
}
if(flag==0)
{
fprintf(fpo,"%s",str);
printf("%s",str);
}
fgets(str,50,fpi);
}
fclose(fpm);
fclose(fpi);
fclose(fpo);
getch();
}

Input Files : 

Macro.txt

MACRO ADD1
MOV A,B
ADD C
MEND
MACRO SUB1
STORE C
MEND

MInput.txt

MOV B,10
MOV C,20
ADD1
MUL C
SUB1
END

MOutput.txt

MOV B,10
MOV C,20
MOV A,B
ADD C
MUL C
STORE C
END

Monday 20 May 2013

Software Engineering-Sem 4-Unit wise important questions-Anna University

UNIT 1:
1.   Explain in detail about the Process Iteration.
2.   Explain in detail about the software life cycle model with various phases
3.   Explain in Detail About the RAD model  and incremental model
4.   Explain in detail about the Component based Software Engineering

Unit II
1.   Explain in detail about the Software Prototyping? Explain the various techniques used in Software Prototyping
2.   What is data modeling? Draw the ER diagram and  Identify the data objects with attributes used in Employee Information systems.
3.   Describe the structure of software requirements specification documents explaining clearly the standards to be followed
4.   Explain Requirement Engineering process in detail

Unit III
1.   Explain cohesion and coupling in with necessary diagrams.
2.   Explain in detail the design concepts.
3.   Explain the design steps of the transform mapping
4.   How you do some effective modular design List out the design heuristics

Unit IV
1.   Explain in detail about system testing
2.   Explain the various types of black-box testing methods.
3.   Explain in detail about the different integration testing approaches
4.   Write a procedure to find the sum of Fibonacci series up to N. find cyclomatic complexity.  Derive all possible test cases.

Unit V
1.   What are the tasks in SCM process? Explain each of them in detail
2.   Write notes on ISO 9000 quality standards
3.   What are direct and indirect measures? Explain size-oriented metrics in detail.
4.   Explain in detail about the process improvement
Related Posts

Friday 17 May 2013

IPL 2013: Sreesanth, Chandila, Chavan arrested for spot-fixing...

Court allowed police to quiz Indian Test pacer S. Sreesanth, two of his Rajasthan Royals teammates - Ankeet Chavan and Ajit Chandila -- and 11 bookies, in their custody for five days. The three players are allegedly facing spot-fixing charges in at least three Indian Premier League games. The three cricketers, with their faces covered, were taken to the magistrate's residence inside the Saket district court complex.
While Sreesanth was arrested on Carter road in Mumbai, Chandila was picked up from Intercontinental Hotel, Mumbai while Chavan was arrested at the Trident Hotel, Mumbai. (Read: BCCI suspends players, Chandila's family cries foulplay). The police also arrested 11 bookies.
In a media briefing on Thursday afternoon, Delhi Police showed clippings of three matches where the players were involved in 'fixing' specific overs. According to Commissioner of Police Neeraj Kumar, Chandila, Sreesanth and Chavan leaked a 'pre-determined number of runs' in separate matches in return for huge sums of money from bookies.
The Police also read out transcripts of conversations between the cricketers and bookies and played out video clips where players gave 'indications' ahead of a 'fixed' over. While Chandila received Rs 20 lakh, Sreesanth and Chavan allegedly received Rs 40 lakh and Rs 50 lakh, respectively, for collaborating with the bookies or their agents.
Saying more than 100 hours of audio clippings were investigated, the Police chief said it was a coincidence that three players of the same team were involved. Police have been tracking phone calls of gullible players since April this year.
In what has been a Black Day for Indian cricket, top players expressed shock and dismay at the spot-fixing incident. (Also read: Gavaskar says Sreesanth an attention seeker, a distraction)
The Rajasthan Royals franchise, which is co-owned by Bollywood star Shilpa Shetty, said in statement that, "We are completely taken by surprise... We will fully cooperate with the authorities to ensure a thorough investigation. The management at Rajasthan Royals has a zero-tolerance approach to anything that is against the spirit of the game." (READ full statement)
Thirty-year-old Sreesanth, a veteran of 53 ODIs and 27 Tests, has been in controversy before over a fight with spinner Harbhajan Singh in the 2008 edition of the IPL.
Chandila, 29, has played for Haryana and the Delhi Daredevils in the IPL previously. Chavan, 27, has played for Mumbai.
Spot fixing is the manipulation of a particular ball or wicket in a cricket tournament, which is then betted upon.
Betting on sports is illegal in India but is allegedly big business in the IPL and is run by underground syndicates in Mumbai and other parts of the country. Sources said bookies often operate out of vehicles now to avoid detection.
Story first published on: Thursday, 16 May 2013 09:10


Wednesday 27 March 2013

5 Ways to Get Rich (Without a Single Discernible Skill)


So you're slogging away at a 9 to 5 job, paying off that student loan, doing all the things The Man said you had to do to succeed. Then one day you stop and think to yourself: there has got to be an easier way to make money.
And that's why you're in jail now. Which is too bad, because it turns out there are a number of completely legal ways to make money--good money--without setting foot in an office or putting on a uniform or even learning a single skill. And people do it every day.


#5.Sperm Donors
Potential Income:$12,000+ per year (depending on the sperm).
Finally, it's the job you've been training for since middle school!
The opportunities are only as limited as your own libido and genetics. For just a couple minutes of your time you can net around $100 for each donation, depending on the bank. Some even offer up to $500 a shot--but that's only if you agree to do it "Open ID" style so that your offspring can come knocking on your door years later.
No matter what career you're currently in, this should be the easiest job interview you've ever been through. There will be some basic health screenings to prove that you can physically handle the gauntlet of porn they're about to throw at you. Also, be ready for a background check on you and your immediate family to make sure that you aren't Charlie Sheen.
"What if I said you didn't have to pay me?"
Did we just mention the porn? Yeah, they put you in a nice quiet room with a bunch of porn. Do the deed, drop off your semen at the desk and make an appointment for later in the week (you can donate every three days).
A hundred bucks, every three days, that's $12,000 a year. And that's just entry level. If you're really serious about this, why limit yourself to one sperm bank? You can hit as many as you want, multiplying your yearly haul with each one. The "Open ID" method specifies that you're limited to two pregnancies per state. But they distribute your sample for you, so assuming you don't mind having a brood of 100 children scattered across America, you're literally sitting on a potential $50,000 at this moment.

And they smile when you give it to them. And they keep it in drinking glass.
Even if you don't go "Open ID," your earning potential is only limited by your ability to deliver the goods. The sperm count tends to decrease with the volume, but your guys can handle a few workouts a day, right?
Ladies, we're not leaving you out of this one. You can donate eggs and--get this--you can wind up with $5,000 or more per cycle.

#4.Street Entertainers
Potential Income:$25,000+ a year.

We've all seen the guy with a guitar hanging out by the subway station with his case open to accept donations. And you've probably dropped a quarter in feeling sorry for his poor homeless ass. But don't be fooled by that sad song about his wife leaving him for someone fitting your general description. He's just doing his job as a "busker." And that job can pay anywhere from $10 to $20 an hour depending on the performer's choice of location and level of talent.
There's even a book on the subject by long-time busker Johnnie Mac, covering all the basics from the choicest locations to where to put your tip cup. Mac spent almost 20 years as a street musician and says he was, "making a fortune... in fact, more than triple what I was making in the job I left behind."
And there's plenty of room for advancement. The Blue Man Group, Jimmy Buffet, Pierce Brosnan, George Burns, Bob Hope, Jewel, Jimmy Page, Penn and Teller, Rod Stewart, Simon and Garfunkel, Bob Dylan and Robin Williams all started their entertainment careers on the streets.

This is none of the people listed above but he's probably loaded.
Sure those people all had talent, but you can also make money miming, fortune telling and standing totally still while covered in silver paint (though we're guessing that last one involves lots of smart-ass kids walking by and punching you in the nuts).
Street performances are perfectly legal in most places as long as they don't interfere with traffic and business. But you do have to deal with the other buskers who are trying to horn in on your racket. After all, your sweet saxophone playing isn't going to get you any cash if there's a dude noisily plucking at his banjo five feet away, drowning you out. Luckily there's a sort of "Busker Code" that street entertainers follow which basically states, "I got to this corner first, and if you try and set up shop here, I'll stab yu."


#3.Human Guinea Pig

Potential Income:$50,000 a year (if you survive).
The key to science is trial and error. This occupation offers offers the excited opportunity to get paid to be one of the two.
Anyone can do it and, if you get involved in enough studies, man can it add up. For instance here's one that pays up to $1,500 for just two days of your time (granted, you have to be in chronic pain to qualify, but who isn't?) or you could get paid $15 an hour to be a test patient for medical students to poke at. And best of all, it's perfectly safe!

"Open big. Good, now swallow this tree frog."
Okay, that's a lie. A couple of years ago 11 people got tuberculosis after participating in a study that was apparently trying to find out what happens when you stick 11 healthy people in the same room with one guy who has tuberculosis.
Sure, that sounds horrifying. But we know at least one of their symptoms was prominent swelling. Of their wallets.



#2.Dumpster Diving


Potential Income:Varies, according to your own dumpster diving skill and creativity.
When we talk about "Dumpster Diving," we aren't talking about fishing out half-eaten hamburgers from behind McDonalds.
No, there are a couple of ways to make real cash. The first is in scrap metal. For instance, soda and beer cans bring 20 cents a pound. It only takes 25 or so cans to make a pound and it's not exactly like they're hard to find (Americans throw away about four billion pounds of them a year). Copper, steel and iron all fetch fair prices at recycling stations and scrap yards.

But more lucrative is all the perfectly good shit people throw away just to get it out of the house. Entire working computers wind up in the trash (after the owners upgraded) along with other electronics, furniture, all sorts of stuff you can sell or use.
Dumpster divers, like buskers, have a culture of their own, complete with rules and even forums where tips and secrets can be traded (the Dumpster World forums are members only, so secrets aren't given away and businesses don't get wind of what's going on behind their shops).
There are plenty of articles out there on the subject if you're looking to get your foot in the door. Remember: One man's discarded vibrator is another's Christmas shopping!


#1.Beggars
Potential Income:$100,000 a year.

Sure, begging isn't anybody's cup of tea, and it's certainly nothing you'd want to brag about at your class reunion. But you know what will make you feel better? $300 a freaking day.
That's exactly how much panhandlers outside a Wal-Mart in Coos Bay, Oregon were making (as much as some workers inside the store made ... in a week). The police there looked into the panhandlers and found they were long-time residents, and even had homes. According to the chief, "This is just their chosen profession."
That's not just an isolated situation, either. This news story found a down-on-her-luck girl begging for money to "buy a bus ticket to get back home." They estimated her income from that gig was around $27,000 a year. By comparison, according to Careers-in-finance.com, the starting salary for a Credit Analyst with a Bachelor's Degree: $27,000.

I can buy and sell your ass.
It isn't as easy as it sounds, though. Here is a helpful guide with many tips and tricks you'll need to know to become a successful beggar, such as:
"Have something to put money in: a cup, a cap, a guitar case ... Empty it regularly so people--both customers and potential crooks--can't see how much you're bringing in."


Wednesday 20 March 2013

MAKE-UP FAILS.....


GWYNETH PALTROW’S FAUX PUNK ROCKER


Gwynnie
Frank Micelotta, Getty Images


COURTNEY LOVE’S CLOWN IMPERSONATION


Neilsen Barnard, Getty Images

Courtney Love‘s Bozo-like makeup in this 2009 shot featured heavy, badly-placed blush, spiky lashes and way too much lipstick smeared on her artificially-inflated lips.
CourtneyLoveThe No. 1 rule of makeup is balance. If you go heavy on the lips, go light on the eyes — and vice versa.
This is all heavy with no measured balance.


LADY GAGA CHANNELS A PANDA


GagaPanda
YouTube

You never can predict what Lady Gaga is going to do with her makeup or her clothes.
When she appeared on a Japanese talk show in 2011, she decided to fully immerse in Asian culture and present herself as a panda, complete with two blacked out eyes and her hair done up in knots above her head like ears.
We can appreciate the sentiment, but unless she was on a kid’s TV show, this type of smeared football war paint was unnecessary. She looks like she’s been the unfortunate victim of domestic violence.

JENNIFER LOPEZ’S FOX FUR LASHES


JLo
David McNew, Getty Images

While Jennifer Lopez usually looks amazing with her bronzed skin, nude lips and false lashes, her eye framers at the 2001 Oscars were constructed of red fox fur.
They thoroughly pissed off animal rights groups, and rightfully so. Any number of synthetic materials would’ve done the trick.
There’s no need to steal an animal’s fur just so you can bat your lashes seductively.
Cruel and uncool.



At the 2001 Oscars, Gwyneth Paltrow tried to shed her WASPy image by going braless in a sheer black dress with a milkmaid braid and smoky eye makeup.
While we loved her inky-eyed style as a characterin ‘The Royal Tenenbaums,’ it doesn’t work in real life.
Gwynnie wore too much messy eye makeup and it didn’t suit her. She was trying to be punk rock and it was a mistake. It prompts one reply: “Sellout!”

Friday 8 March 2013

20 Things You Didn't Know About 'Aladdin'


Can you believe it has been 20 years since Aladdin first entered our lives? The film was an absolute sensation, garnering much critical and financial success. After two decades I thought it would be “soaring good fun” to review the influence of this brand in the Disney universe.
This edition of Disney In Depth will highlight 20 fun facts about everything you ever wanted to know about Prince Ali and company.

Aladdin and Jasmine soar above the clouds on Magic Carpet

1. Though Abu and Rajah serve as the best animal friends to lead characters Aladdin and Jasmine, they do not appear – nor are referenced – in the stage show production at Disney California Adventure Park.

2. Alan Menken won two Oscars for his work on Aladdin, one for his original score and the other for his music on “A Whole New World.”
3. In Aladdin and the King of Thieves, Genie makes reference to a boatload of Disney characters, including Chief Powhatan’s famous daughter, as seen in this clipat about the 1:07 mark.
Aladdin in Nasira's Revenge

4. Jafar has a fraternal twin sister, a sorceress named Nasira. She serves as the villain for the Aladdin-themed video game, “Disney’s Aladdin in Nasira’s Revenge.” Nasira is voiced by none other than Ariel the Little Mermaid herself, actress Jodi Benson.

5. When the film was first released on VHS in 1993, Aladdin sold a whopping 25 million copies.

6. Scott Weinger, the voice of Aladdin, is best known for his role as Steve, D.J.’s boyfriend, on Full House. He even appeared as a live-action version of the character as an in-joke in this scene, when D.J. imagines Steve in the role of the “street rat.”

7. In an early version of Aladdin, the protagonist was to have a mother. Thus, the Howard Ashman-Alan Menken song called “Proud of Your Boy” was scrapped. However the song is featured in a Clay Aiken-sung music video, highlighted on the 2004 DVD.

8. Dan Castellaneta, the voice of Homer Simpson, brought Genie to life in The Return of Jafar, after Robin Williamsexperienced a temporary falling-out with The Walt Disney Company. Castellaneta recorded all of his dialogue as Genie forAladdin and the King of Thieves, but once Williams returned to the role, his voice-work was removed.

9. Princess Jasmine, descending from Arabian heritage, was the first non-Caucasian Disney princess.

10. Aladdin earned over $500 million worldwide during its theatrical release and was the highest-grossing domestic film of 1992.

11. Aladdin boasts an entire section of Tokyo DisneySea, “Arabian Coast,” its design influenced by the environments of India and the Middle East.
"The Return of Jafar" VHS cover

12. The Return of Jafar was the first Disney direct-to-video animated feature, released in 1994. This launched a new platform for Disney, allowing them to utilize their characters in even more features.

13. The characters from the Aladdin television series guest-starred on an episode of the late-’90s Hercules animated series.

14. Following Disney’s precedent in re-releasing Beauty and the Beast and The Lion King in the IMAX format, Aladdin was scheduled to return to theaters in that format. Yet that re-release was canceled, even though a trailer had already been shown to IMAX audiences.

15. Aladdin’s appearance was originally modeled after actor Michael J. Fox, though movie-star Tom Cruise and even rapper MC Hammer later served as inspirations.

16. The Beast from the 1991 animated feature makes a “cameo appearance” in Aladdin, in the form of a figurine that the Sultan plays with, along with a whole stack of animals.

17. According to a Travel Channel special that explored the Disneyland Resort and the making of “Aladdin: A Musical Spectacular,” the actor who plays the Genie must go through over an hour-and-a-half of prosthetic, make-up, and other processes to transform into the blue comedic force.
"A Whole New World" single cover

18. The pop version of “A Whole New World” by Peabo Bryson and Regina Belle topped the Billboard Hot 100 chart on March 6, 1993. This is the only song from a Disney animated feature to claim that number one honor.

19. In Disneyland’s “it’s a small world,” characters from Aladdin, designed to fit the style of the scene, hover on the Magic Carpet.

20. Both Lea Salonga (Jasmine’s singing voice) and Linda Larkin (Jasmine’s speaking voice) were honored with Disney Legend awards at the 2011 ceremony, held at the D23 Expo, as seen in the clips below.
Agrabah aficionados, I encourage you to share your favorite moments and memories of Aladdin. Share your comments below and tweet your thoughts. If Genie granted you three wishes, what would you use them toward? I think having a buddy like Genie or Carpet would be a solid call.
This is Brett Nachman, signing off. Return back next week for another edition of Disney In Depth. Catch alerts for upcoming editions of the column by following me on Twitter. Have a good week!

Monday 28 January 2013

Megan Fox Bikini: Pregnant Star Shows Off Baby Bump In Hawaii (PHOTO)


There's no denying it now.
Megan Fox, 26, and her husband, Brian Austin Green, 38, were spotted enjoying some romantic R&R together in Kona, Hawaii, over the weekend, and if they were trying to keep their exciting baby news under wraps, it looks as if the secret's out.
The actress's growing baby bump was on full display as she sported a leopard-print bikini and a flowing maxi skirt while celebrating her second anniversary with Green. Hawaii is certainly a special place for the couple --they were married in a small beach ceremony there in 2010.
Though they've done their best to hide Fox's pregnancy, rumors that the couple was expecting a baby popped up earlier this year. This will be the couple's first child together, and the new addition will join Green's son, Kassius, 10.
In May, Green refused to confirm Fox's pregnancy, telling People that baby rumors have followed their relationship for years.
"They've been saying [she's pregnant] every three months ever since we got married, and it's sort of one of those things that they love to say," he said. "I think it's interesting. I think there is a part of Megan that people really love that is, at 18 she found a relationship and she stuck with it, and we've been together for coming on eight years now."
Check out a photo of Fox and Green below:
megan fox bikini pregnant baby bump

Megan Fox Lost The Baby Weight Without Working Out


Is Megan Fox actively trying to get women to dislike her?

Megan Fox Baby Weight
The 26-year-old gained a mere 23 pounds while pregnant with her first son, Noah, which explains why she barely looked pregnant at the end of nine months.
Fox revealed that she's already lost 13 of the pounds she gained while pregnant (though it's hard to believe she has any more weight to lose) and she did it without even hitting the gym.
"I can't work out yet because my body is still too fragile," Fox told Us Weekly at the Dec. 12 premiere of "This Is 40." "I try to eat whatever I want, but I don't eat any dairy, and I guess that's the biggest diet tip. Try and stay away from dairy -- especially if you're a woman! It's really hard on your hormones."
Fox and husband Brian Austin Green welcomed their first son together in September. Though Fox is a first-time mom, she had some parental experience as stepmom to Green's 10-year-old son, Kassius.
The actress has said she wants a big family, but she recently revealed she had terrible morning sickness and felt awful in the early stages of her pregnancy.
"It was so bad for me, actually, I thought I was maybe birthing a vampire baby," she joked to Jay Leno earlier this month. "I like that that was your first thought. 'You know, I’ll bet this is probably a vampire baby,'" Leno quipped.