SlideShare a Scribd company logo
Cprogramminginterviewquestions 120622074544-phpapp01
Q.1: What is C language
in your opinion?
 Developed by Dennis Ritchie
between 1969 & 1973.
 Developed at the Bell
Laboratories, aimed to use with
UNIX OS.
 Widely used for developing
application software, though it
was mainly invented for
developing system software.
Q.2: What is a static
variable in context of C
language?
 Declared inside a function.
 Declared for function name.
 Declared for Global parameters.
Q.3: Can you explain the
difference between a
normal variable and a
pointer?
 A normal variable can have any value
and can be changed throughout the
length of the program.
 A pointer defines the address where
another variable is stored and not any
value.
Q.4: What is the
difference
between calloc() and
malloc()?
 malloc() will create single block of memory of
size specified by the user.
 Example - p=(int*)malloc(sizeof(int)*5)
 calloc() takes two arguments and zero initializes
the memory. It can assign multiple blocks of
memory for a variable.
 Example - p=(int*)calloc(5,sizeof(int)*5)
Q.5: What is the
difference between printf()
and sprint()?
 Printf() outputs the data to the standard
output device which is usually the
computer monitor.
 Sprint() outputs the data to a character
array.
Q.6: Which is the fastest
sorting method you can
use while programming in
c language?
This is a question which falls into “There is no
one-size-fits-all answer” category. But few
options are-
 Quick sort.
 Radix sort.
 Merge sort.
Q.7: Is using functions or
macros better when
programming in C?
 Macros are generally more efficient and
faster.
 Macros cannot handle complex programming
constructs and in such cases functions are
used
 We can choose macros or functions based on
our priority - speed vs. size of program.
Q.8: What is a Stack?
 Stack is where information required to call
and return function resides
 It also stores a functions local variable
 Stack follows a FIFO model
Q.9: What is the
difference between C and
C++?
 C++ is an advanced version of C which
introduced a lot of new features like
classes and so on.
 It’s much more object oriented compared to
the general purpose programming C was
initially created for.
Q.10: Is it good to use
goto statement?
 goto statements are used to implement a
local jump during program execution.
 It is not considered a good practice to use
goto statements and should be avoided as
much as possible.
For more C++ gyan, log on
to-
YourNextLeap.com

More Related Content

PDF
0502 Object Oriented Programming Through Java Set1
PPTX
Python vs c++ ppt
PDF
C++ vs python
PDF
C++ vs python the best ever comparison
PPTX
Thomas Wolf "Transfer learning in NLP"
PPTX
PDF
Assignment 1 for 2nd sem
PDF
I have a question about attacks on the implementation of cryptographic code t...
0502 Object Oriented Programming Through Java Set1
Python vs c++ ppt
C++ vs python
C++ vs python the best ever comparison
Thomas Wolf "Transfer learning in NLP"
Assignment 1 for 2nd sem
I have a question about attacks on the implementation of cryptographic code t...

What's hot (14)

PDF
GPT and other Text Transformers: Black Swans and Stochastic Parrots
PPTX
Notes on attention mechanism
PDF
Arguman
PPTX
Attention Mechanism in Language Understanding and its Applications
PDF
Labelled Variables in Logic Programming: A First Prototipe in tuProlog
PDF
Meeting13
PPT
A First Look at Google's Go Programming Language
PPTX
Financial Risk Mgt - Lec 4 by Dr. Syed Muhammad Ali Tirmizi
PDF
Paradigms programming from functional to multi-agent dataflow
PDF
Deep learning for NLP and Transformer
PPTX
F# Tutorial @ QCon
PPTX
C Interview Basic Q&A- 1
PDF
Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"
PDF
[Impl] neural machine translation
GPT and other Text Transformers: Black Swans and Stochastic Parrots
Notes on attention mechanism
Arguman
Attention Mechanism in Language Understanding and its Applications
Labelled Variables in Logic Programming: A First Prototipe in tuProlog
Meeting13
A First Look at Google's Go Programming Language
Financial Risk Mgt - Lec 4 by Dr. Syed Muhammad Ali Tirmizi
Paradigms programming from functional to multi-agent dataflow
Deep learning for NLP and Transformer
F# Tutorial @ QCon
C Interview Basic Q&A- 1
Oleksii Moskalenko "Continuous Delivery of ML Pipelines to Production"
[Impl] neural machine translation
Ad

Similar to Cprogramminginterviewquestions 120622074544-phpapp01 (20)

PPTX
C programming interview questions
PDF
C Interview Questions PDF By Scholarhat.pdf
PDF
C interview questions
PDF
C question-bank-ebook
PDF
Top C Language Interview Questions and Answer
PPTX
Introduction to c
PDF
C basic questions&ansrs by shiva kumar kella
PDF
C question-answer-bank
PDF
C language 100 questions answers
PPTX
C language
PDF
Let Us C-Yashwant Kanetkar.pdf
PDF
Let us c - Assignment for presentation..
PDF
Basic Information About C language PDF
PPTX
Technical Interview
PDF
0769-let-us-c.pdf
PDF
Top interview questions in c
PDF
C interview-questions-techpreparation
PDF
INTRODUCTION TO C BOOK FOR REFERENCE.pdf
PDF
Let us c yashwant kanetkar
PDF
Let us c yashwant kanetkar(1)
C programming interview questions
C Interview Questions PDF By Scholarhat.pdf
C interview questions
C question-bank-ebook
Top C Language Interview Questions and Answer
Introduction to c
C basic questions&ansrs by shiva kumar kella
C question-answer-bank
C language 100 questions answers
C language
Let Us C-Yashwant Kanetkar.pdf
Let us c - Assignment for presentation..
Basic Information About C language PDF
Technical Interview
0769-let-us-c.pdf
Top interview questions in c
C interview-questions-techpreparation
INTRODUCTION TO C BOOK FOR REFERENCE.pdf
Let us c yashwant kanetkar
Let us c yashwant kanetkar(1)
Ad

Recently uploaded (20)

PPTX
Introduction to Building Materials
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PPTX
Lesson notes of climatology university.
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
IGGE1 Understanding the Self1234567891011
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
Trump Administration's workforce development strategy
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PDF
Indian roads congress 037 - 2012 Flexible pavement
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
PDF
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
PPTX
Unit 4 Skeletal System.ppt.pptxopresentatiom
PDF
Classroom Observation Tools for Teachers
Introduction to Building Materials
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Paper A Mock Exam 9_ Attempt review.pdf.
A powerpoint presentation on the Revised K-10 Science Shaping Paper
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
Lesson notes of climatology university.
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
IGGE1 Understanding the Self1234567891011
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Trump Administration's workforce development strategy
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
Indian roads congress 037 - 2012 Flexible pavement
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
Unit 4 Skeletal System.ppt.pptxopresentatiom
Classroom Observation Tools for Teachers

Cprogramminginterviewquestions 120622074544-phpapp01

  • 2. Q.1: What is C language in your opinion?
  • 3.  Developed by Dennis Ritchie between 1969 & 1973.  Developed at the Bell Laboratories, aimed to use with UNIX OS.  Widely used for developing application software, though it was mainly invented for developing system software.
  • 4. Q.2: What is a static variable in context of C language?
  • 5.  Declared inside a function.  Declared for function name.  Declared for Global parameters.
  • 6. Q.3: Can you explain the difference between a normal variable and a pointer?
  • 7.  A normal variable can have any value and can be changed throughout the length of the program.  A pointer defines the address where another variable is stored and not any value.
  • 8. Q.4: What is the difference between calloc() and malloc()?
  • 9.  malloc() will create single block of memory of size specified by the user.  Example - p=(int*)malloc(sizeof(int)*5)  calloc() takes two arguments and zero initializes the memory. It can assign multiple blocks of memory for a variable.  Example - p=(int*)calloc(5,sizeof(int)*5)
  • 10. Q.5: What is the difference between printf() and sprint()?
  • 11.  Printf() outputs the data to the standard output device which is usually the computer monitor.  Sprint() outputs the data to a character array.
  • 12. Q.6: Which is the fastest sorting method you can use while programming in c language?
  • 13. This is a question which falls into “There is no one-size-fits-all answer” category. But few options are-  Quick sort.  Radix sort.  Merge sort.
  • 14. Q.7: Is using functions or macros better when programming in C?
  • 15.  Macros are generally more efficient and faster.  Macros cannot handle complex programming constructs and in such cases functions are used  We can choose macros or functions based on our priority - speed vs. size of program.
  • 16. Q.8: What is a Stack?
  • 17.  Stack is where information required to call and return function resides  It also stores a functions local variable  Stack follows a FIFO model
  • 18. Q.9: What is the difference between C and C++?
  • 19.  C++ is an advanced version of C which introduced a lot of new features like classes and so on.  It’s much more object oriented compared to the general purpose programming C was initially created for.
  • 20. Q.10: Is it good to use goto statement?
  • 21.  goto statements are used to implement a local jump during program execution.  It is not considered a good practice to use goto statements and should be avoided as much as possible.
  • 22. For more C++ gyan, log on to- YourNextLeap.com