Junior C Entwickler Interview Questions

40 junior c entwickler interview questions shared by candidates

(technical interview) Build a data structure that supports the following functions: int alloc() - allocates a new element to a data structure and initializes its value to 0. void inc(key) - Increases the value of the element by one. int get(key) - returns the value of the given key void resetAll() - Initializes the values ​​of all elements to be 0.
avatar

Junior C++ Software Developer

Interviewed at Infinidat

3.9
Nov 8, 2020

(technical interview) Build a data structure that supports the following functions: int alloc() - allocates a new element to a data structure and initializes its value to 0. void inc(key) - Increases the value of the element by one. int get(key) - returns the value of the given key void resetAll() - Initializes the values ​​of all elements to be 0.

Identify memory leak: // this function has a memory leak. Can you find it? int i = 5; // <-- char *pszString = (char *)malloc(32); memset(pszString, 0, sizeof(32)); strcpy(pszString, "hi"); if (i > 5) { sprintf(pszString, "%i is greater than 5", i); printf("%s\n", pszString); free(pszString); } else if (i < 5) { sprintf(pszString, "%i is less than 5", i); printf("%s\n", pszString); free(pszString); } }
avatar

Junior Software Developer (C++)

Interviewed at Accelya Group

3.4
Aug 15, 2024

Identify memory leak: // this function has a memory leak. Can you find it? int i = 5; // <-- char *pszString = (char *)malloc(32); memset(pszString, 0, sizeof(32)); strcpy(pszString, "hi"); if (i > 5) { sprintf(pszString, "%i is greater than 5", i); printf("%s\n", pszString); free(pszString); } else if (i < 5) { sprintf(pszString, "%i is less than 5", i); printf("%s\n", pszString); free(pszString); } }

Viewing 1 - 10 interview questions

Glassdoor has 40 interview questions and reports from Junior c entwickler interviews. Prepare for your interview. Get hired. Love your job.