Software Engineer C Interview Questions

665,113 software engineer c interview questions shared by candidates

How to print "hello world" by using following if else block: if(write any condition you want) printf("World"); else printf("Hello"); I answered them that we can use goto statement, but he expected other answer that i didn't know at that time.
avatar

Programmer

Interviewed at Bitwise

3.6
Jun 3, 2014

How to print "hello world" by using following if else block: if(write any condition you want) printf("World"); else printf("Hello"); I answered them that we can use goto statement, but he expected other answer that i didn't know at that time.

1. You have n doors in a row that are all initially closed. You make n passes by the doors starting with the first door every time. The first time through you visit every door and toggle the door (if the door is closed, you open it, if its open, you close it). the second time you only visit every 2nd door (door #2, #4, #6. third pass you toggle 3rd, 6th, 9th door. What state are the doors in after the last pass? which doors are open ?
avatar

Senior Software Engineer

Interviewed at LinkedIn

3.8
Apr 5, 2017

1. You have n doors in a row that are all initially closed. You make n passes by the doors starting with the first door every time. The first time through you visit every door and toggle the door (if the door is closed, you open it, if its open, you close it). the second time you only visit every 2nd door (door #2, #4, #6. third pass you toggle 3rd, 6th, 9th door. What state are the doors in after the last pass? which doors are open ?

Debugging + System design: We wrote a simple (single-threaded) web crawler. Given a starting URL, it visits every reachable page. For each page, it determines the URLs of every static asset (images, javascript, stylesheets) on that page. The crawler returns a list with an entry for each crawled page and a listing of URLs for the assets found in that page.
avatar

Senior Software Engineer

Interviewed at GoCardless

3.7
Feb 2, 2021

Debugging + System design: We wrote a simple (single-threaded) web crawler. Given a starting URL, it visits every reachable page. For each page, it determines the URLs of every static asset (images, javascript, stylesheets) on that page. The crawler returns a list with an entry for each crawled page and a listing of URLs for the assets found in that page.

Game related to coins : There are a bunch of coins on the table (about 20 I think) and 2 players have to pick 1-5 coins at each turn. The player who picks last coin wins the game. What will be your strategy if you are given the 1st chance to pick coins ?
avatar

Software Engineer

Interviewed at Cadence Design Systems

4.1
Oct 7, 2012

Game related to coins : There are a bunch of coins on the table (about 20 I think) and 2 players have to pick 1-5 coins at each turn. The player who picks last coin wins the game. What will be your strategy if you are given the 1st chance to pick coins ?

Viewing 801 - 810 interview questions

Glassdoor has 665,113 interview questions and reports from Software engineer c interviews. Prepare for your interview. Get hired. Love your job.