A new reality is setting in for students and recent graduates who spent years honing themselves for careers at the largest tech companies.Ever since she was a 10th grader in Seattle, Annalice Ni wanted to develop software for a prominent tech company like Google. So she went to great lengths to meet the internship and other résumé criteria that make students attractive hires to the biggest tech firms.In high school, Ms. Ni took computer science courses, interned at Microsoft and volunteered as a coding teacher for younger students. She majored in computer science at the University of Washington, earning coveted software engineering internships at Facebook. After graduating from college this year, she moved to Silicon Valley to start her dream job as a software engineer at Meta, Facebook’s parent company.Then last month, Meta laid off more than 11,000 employees — including Ms. Ni.“I did feel very frustrated and disappointed and maybe a bit scared because all of a sudden, I didn’t know what to do,” Ms. Ni, 22, said of her unexpected career setback. “There’s not much I could have done, especially in college, more than I already did, better than I already did.”Over the last decade, the prospect of six-figure starting salaries, perks like free food and the chance to work on apps used by billions led young people to stampede toward computer science — the study of computer programming and processes like algorithms — on college campuses across the United States. The number of undergraduates majoring in the subject more than tripled from 2011 to 2021, to nearly 136,000 students, according to the Computing Research Association, which tracks computing degrees at about 200 universities.Ms. Ni spends her days interviewing for jobs and brushing up on her skills.Jason Henry for The New York TimesTech giants like Facebook, Google and Microsoft encouraged the computing education boom, promoting software jobs to students as a route to lucrative careers and the power to change the world.But now, layoffs, hiring freezes and planned recruiting slowdowns at Meta, Twitter, Alphabet, Amazon, DoorDash, Lyft, Snap and Stripe are sending shock waves through a generation of computer and data science students who spent years honing themselves for careers at the largest tech companies. Tech executives have blamed a faltering global economy for the jobs slowdown.The cutbacks have not only sent recent graduates scrambling to find new jobs but also created uncertainty for college students seeking high-paying summer internships at large consumer tech companies.In the past, tech companies used their internship programs to recruit promising job candidates, extending offers to many students to return as full-time employees after graduation. But this year, those opportunities are shrinking.Amazon, for instance, hired about 18,000 interns this year, paying some computer science students nearly $30,000 for the summer, not including housing stipends. The company is now considering reducing the number of interns for 2023 by more than half, said a person with knowledge of the program who was not authorized to speak publicly.More on Big TechMicrosoft: The company’s $69 billion deal for Activision Blizzard, which rests on winning the approval by 16 governments, has become a test for whether tech giants can buy companies amid a backlash.Apple: Apple’s largest iPhone factory, in the city of Zhengzhou, China, is dealing with a shortage of workers. Now, that plant is getting help from an unlikely source: the Chinese government.Amazon: The company appears set to lay off approximately 10,000 people in corporate and technology jobs, in what would be the largest cuts in the company’s history.Meta: The parent of Facebook said it was laying off more than 11,000 people, or about 13 percent of its work forceBrad Glasser, an Amazon spokesman, said the company was committed to its internship program and the real-word experience that it provided. A Meta spokeswoman referred to a letter to employees from Mark Zuckerberg, the company’s chief executive, announcing the company’s layoffs last month.Hiring plans are also changing at smaller tech firms. Roblox, the popular game platform, said it planned to hire 300 interns for next summer — almost twice as many as this year — and was expecting more than 50,000 applications for those spots. Redfin, which employed 38 interns this summer, said it had canceled the program for next year.There are still good jobs for computing students, and the field is growing. Between 2021 and 2031, employment for software developers and testers is expected to grow 25 percent, amounting to more than 411,000 new jobs, according to projections from the Bureau of Labor Statistics. But many of those jobs are in areas like finance and the automotive industry.“Students are still getting multiple job offers,” said Brent Winkelman, chief of staff for the computer science department at the University of Texas at Austin. “They just may not come from Meta, from Twitter or from Amazon. They’re going to come from places like G.M., Toyota or Lockheed.”College career centers have become sounding boards for anxious students on the cusp of entering the tech job market. In career counselors’ offices, the search for a Plan B has heightened.Some students are applying to lesser-known tech companies. Others are seeking tech jobs outside the industry, with retailers like Walmart or with government agencies and nonprofits. Graduate school is also an option.“This particular class has been a lot more savvy than previous classes,” said Hazel Raja, senior director of the career development office at Pomona College in Claremont, Calif. “Even those who have secured job offers, they’re still making sure they’re networking and staying engaged in campus recruiting opportunities.”Helen Dong, 21, a senior majoring in computer science at Carnegie Mellon University, interned at Meta twice, in 2021 and 2022. So she was surprised at the end of this summer, she said, when she did not receive a job offer from the company. Meta’s recent layoffs prompted her to apply for jobs outside tech, at automotive and financial companies. Last month, she posted videos on TikTok advising her peers to adjust their job expectations.Helen Dong, 21, a senior majoring in computing at Carnegie Mellon University, interned at Meta but did not receive a job offer. Now she is looking in the finance and automotive industries.Helen Dong“I chose to major in computer science so that I could get a ton of offers after college and make bank,” Ms. Dong joked in one TikTok, as she sang along to “Reduce Your Expectations to 0.” In this job market, she wrote at the bottom of the video, “be grateful with 1 offer.”In interviews, 10 college students and recent graduates said they were not prepared for a slowdown in jobs at the largest tech companies. Until recently, those companies were fiercely competing to hire computer science majors at top schools — with some students receiving multiple job offers with six-figure starting salaries and five-digit signing bonuses. An entire genre of TikTok videos had sprung up dedicated to young techies extolling their job perks and their annual compensation, with at least one highlighting a $198,000 package, complete with stock options and relocation expenses.Dozens of people who were recently laid off, or whose tech job offers were rescinded, have posted details of their plights on LinkedIn. To alert recruiters, some have added the hashtag #opentowork to their LinkedIn profile photos.Tony Shi, 23, who majored in computer science and business at Western University in London, Ontario, is one of them. After graduating this year, he began working as a product manager at Lyft in August. In November, the ride-hailing company laid off about 650 employees, including Mr. Shi.Now he is on a tight deadline to find a new job. Mr. Shi is Canadian, from Waterloo, Ontario, and obtained a visa to move to San Francisco for his job at Lyft. Under the visa, he has 60 days to find a new job. He said he had become more sensitive to the businesses and balance sheets of potential employers.“I need to be a little more risk-averse. I definitely don’t want to get laid off again,” he said. Instead of his taking a company for its word, he added, “now, the product needs to make a lot of sense.”Meta rescinded its job offer to Rachel Castellino, 22, weeks before she was scheduled to start work.Jason Henry for The New York TimesSome recent graduates did not get the chance to start their new tech jobs.Rachel Castellino, a statistics major at the California Polytechnic State University, worked to land a job at a major tech company. During college, she interned as a project manager at PayPal, received a data science fellowship funded by the National Science Foundation and founded a data science club at her school.Ms. Castellino, 22, knew she would have to grind to pass companies’ technical interviews, which typically involve solving programming problems. Last year, she spent much of the fall job hunting and preparing for coding assessments. For four days a week, from 8 a.m. to 4 p.m., she studied probability concepts and programming languages. Even so, she said, the interview process was brutal.In November 2021, Meta offered her a job as a data scientist, starting in December 2022. Last month, Meta rescinded the offer, she said.“I worked so hard for those interviews. It felt really good to earn something of a high caliber,” she said. “I had so much to look forward to.”The setback has been disheartening. “I was upset,” Ms. Castellino said. “It wasn’t good to hear.”As for Ms. Ni, she now views losing her dream job as an opportunity to broaden her career horizons. Over the last month, she has applied to midsize tech firms and start-ups that she finds innovative — potential employers she had not previously considered.“I’m exploring opportunities that I didn’t before,” Ms. Ni said. “I feel like I’ve already learned some things.”Karen Weise More