Podcast
Questions and Answers
What is the correct way to declare the Book structure?
What is the correct way to declare the Book structure?
- struct Book { char title; char author; char subject; int book_id; } Books;
- Books { char title; char author; char subject; int book_id; } struct Book;
- struct Books { char title; char author; char subject; int book_id; } book; (correct)
- Book { char title; char author; char subject; int book_id; } struct Books;
Which function is used to copy a string in C?
Which function is used to copy a string in C?
- strcopy()
- copy()
- strcpy() (correct)
- strncpy()
How do you access members of a structure in C?
How do you access members of a structure in C?
- Using the member access operator (. ) (correct)
- Using the member access operator (::)
- Using the member access operator (-->)
- Using the member access operator (->)
Which statement is used to print a string in C?
Which statement is used to print a string in C?
What is the purpose of the int main()
function in a C program?
What is the purpose of the int main()
function in a C program?
In the provided example, what is the value assigned to Book1's book_id
?
In the provided example, what is the value assigned to Book1's book_id
?
What is the correct way to assign a string to Book1.title
?
What is the correct way to assign a string to Book1.title
?
Which function is used to compare two strings in C?
Which function is used to compare two strings in C?
What is the correct statement about declaring structures in C?
What is the correct statement about declaring structures in C?
Flashcards are hidden until you start studying