Junior C Developer Interview Questions

4,382 junior c developer interview questions shared by candidates

1-How do we restrict creation of heap objects in a class without using static variable. 2-what is heap and stack 3-why pointers have different data types even if pointer is stored with same memory space. 4-Smart pointer details and code for generic smart pointer 5-write a program to select pair of numbers such that sum should be 10. Array of 50 elements given, we need to create pair of two from array and once pair is created those elements should not be reused 6-select third highest salary of employees from table 7-diff between stack and queue 8-deep understanding of current project
avatar

AVP-C++

Interviewed at Barclays

4
Mar 15, 2023

1-How do we restrict creation of heap objects in a class without using static variable. 2-what is heap and stack 3-why pointers have different data types even if pointer is stored with same memory space. 4-Smart pointer details and code for generic smart pointer 5-write a program to select pair of numbers such that sum should be 10. Array of 50 elements given, we need to create pair of two from array and once pair is created those elements should not be reused 6-select third highest salary of employees from table 7-diff between stack and queue 8-deep understanding of current project

Normalize a file path/directory: /// /// /// Normalizes the path, meaning that you reduce any unnecessary directory. /// For example, given the value notneeded1/notneeded2/../../hello you would /// return hello. /// /// /// input string /// Normalized string /* * Sample Directory structure * - home * -- documents * -- desktop * -- myMedia * ----- photos * ----- videos * ----- music * -- downloads * /home/myMedia/photos/../../documents -> /home/documents * /home/myMedia/photos/../documents/.. -> /home/myMedia * /home/myMedia/../documents -> /home/documents * ../home -> ../home * home/../../final -> ../final * /home/myMdeia/documents -> /home/myMdeia/documents * Case 1: * C:\ [current working directory] * cd hello [command operating on cwd] * C:\hello [final path] * Case 2: * C:\ [current working directory] * cd notneeded1/notneeded2/../../hello [command operating on cwd] * C:\hello [final path] */
avatar

Junior Software Developer (C++)

Interviewed at Accelya Group

3.4
Aug 15, 2024

Normalize a file path/directory: /// /// /// Normalizes the path, meaning that you reduce any unnecessary directory. /// For example, given the value notneeded1/notneeded2/../../hello you would /// return hello. /// /// /// input string /// Normalized string /* * Sample Directory structure * - home * -- documents * -- desktop * -- myMedia * ----- photos * ----- videos * ----- music * -- downloads * /home/myMedia/photos/../../documents -> /home/documents * /home/myMedia/photos/../documents/.. -> /home/myMedia * /home/myMedia/../documents -> /home/documents * ../home -> ../home * home/../../final -> ../final * /home/myMdeia/documents -> /home/myMdeia/documents * Case 1: * C:\ [current working directory] * cd hello [command operating on cwd] * C:\hello [final path] * Case 2: * C:\ [current working directory] * cd notneeded1/notneeded2/../../hello [command operating on cwd] * C:\hello [final path] */

1) Introduce yourself (I Gave answer) 2) About the project (I Gave answer) 3) Remove duplicates in array (I Gave answer) 4) Sub-Queries(MySQL) (He Gave me Hint) 5) DDL and DML differences (I Gave answer) 6) ACID Properties explanation (I Gave answer) 7) Difference between set and tuple (I Gave answer) 8) What are lists? (I Gave answer) 9) What is Dictionary? (I Gave answer) 10) Reverse a String(But in one line) (He Gave me some Hint after i took time to think) 11) Remove Duplicates in list in one line (Done using Set()) 12) Why we use COMMIT in SQL (I gave answer) 13) Given a code to guess output (I gave him wrong answer but then after some time i was able to crack it) 14) What are types of Joins? (I gave answer) 15) What is Self Join? (Not able to Answer as I don't know exactly) He said No Problem 16) What is __init__ method? (I gave answer) 17) What is Inheritance? (I gave answer) 18) Difference between DELETE and TRUCATE (Not Sure able TRUCATE But I was Confident) 19) What is pass keyword? (I was able to give general Answer) 20) what are args and *args ?(Unable to answer) And He moved to HR Questions 21)Are you able to work on various shifts? (Yes)
avatar

Gen C

Interviewed at Cognizant

3.4
Nov 19, 2024

1) Introduce yourself (I Gave answer) 2) About the project (I Gave answer) 3) Remove duplicates in array (I Gave answer) 4) Sub-Queries(MySQL) (He Gave me Hint) 5) DDL and DML differences (I Gave answer) 6) ACID Properties explanation (I Gave answer) 7) Difference between set and tuple (I Gave answer) 8) What are lists? (I Gave answer) 9) What is Dictionary? (I Gave answer) 10) Reverse a String(But in one line) (He Gave me some Hint after i took time to think) 11) Remove Duplicates in list in one line (Done using Set()) 12) Why we use COMMIT in SQL (I gave answer) 13) Given a code to guess output (I gave him wrong answer but then after some time i was able to crack it) 14) What are types of Joins? (I gave answer) 15) What is Self Join? (Not able to Answer as I don't know exactly) He said No Problem 16) What is __init__ method? (I gave answer) 17) What is Inheritance? (I gave answer) 18) Difference between DELETE and TRUCATE (Not Sure able TRUCATE But I was Confident) 19) What is pass keyword? (I was able to give general Answer) 20) what are args and *args ?(Unable to answer) And He moved to HR Questions 21)Are you able to work on various shifts? (Yes)

Viewing 4271 - 4280 interview questions

Glassdoor has 4,382 interview questions and reports from Junior c developer interviews. Prepare for your interview. Get hired. Love your job.