Skip to content

Commit

Permalink
Added 2 new questions (#2298)
Browse files Browse the repository at this point in the history
Added 2 new questions but without a correct answer.
  • Loading branch information
commonsw04 authored Sep 30, 2021
1 parent 82b6b5d commit bfac144
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions c-(programming-language)/c-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -451,3 +451,56 @@ printf("%d", f1(5));
- [x] `char string = "Hello World";`
- [ ] `char string[20] = {'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd'};`
- [ ] `char string[] = "Hello World";`
#### Q35. Which choice is an include guard for the header file mylib.h?
- [ ]
```c
#ifdef MYLIB_H
#undef MYLIB_H
// mylib.h content
#endif /* MYLIB_H */
```
- [ ]
```c
#ifndef MYLIB_H
#define MYLIB_H

// mylib.h content

#endif /* MYLIB_H */
```
- [ ]
```c
#define MYLIB_H
#include "mylib.h"

#undef MYLIB_H
```
- [ ]
```c
#ifdef MYLIB_H
#define MYLIB_H

// mylib.h content

#endif /* MYLIB_H */
```
#### Q36. How many times does the code inside the while loop get executed in this program?
```c
main(){
int x=1;
while(x++<100){
x*=x;
if(x<10) continue;
if(x>50) break
}
}
```

- [ ] 100
- [ ] 3
- [ ] 5
- [ ] 50

0 comments on commit bfac144

Please sign in to comment.