Constructor Quiz-Asked in Interview

Predict output of the following program.

#include <stdio.h>int main(){printf(“new_c_questionby”);printf(“placewit”);getchar();return 0;}

A) ew_c_question




C) placewit

D) Depends on terminal configuration

Solution: D is correct

The characters will get sent just like that to the underlying output device (in your case probably a terminal emulator).It is up to the terminal’s implementation then how those characters get actually displayed. For example, a bell (\a) could trigger a beep sound on some terminals, a flash of the screen on others, or it will be completely ignored. It all depends on how the terminal is configured.

Thanks for Reading

Placewit grows the best engineers by providing an interactive classroom experience and by helping them develop their skills and get placed in amazing companies.

Learn more at Placewit. Follow us on Instagram and Facebook for daily learning.




Upskilling students for tech placements!

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Setting up Precompiled header for Sublime Text in Linux

Root Me TryHackMe | Walkthrough

Speeding Up Logistics with a Lightweight Timer Task Scheduling Engine

Intersection Of Two Linked Lists

Learning Flutter’s new Navigation and Routing system

Designing Data Intensive Applications: Transactions with Weak Isolation

How do CPUs execute instructions in parallel ?

gRPC API Performance Improvement Through Protobuf FieldMask In .NET

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


Upskilling students for tech placements!

More from Medium

This Pointer

Interview preparation -DSA #day1

14 Days Study Plan to Crack Algo I

Leetcode Q224. Basic Calculator (Q216)