Programming In C Solved MCQs

  Programming In C MCQs This section contains more frequently asked Programming In C MCQs in the various University Level and Co...


 Programming In C MCQs

This section contains more frequently asked Programming In C MCQs in the various University Level and Competitive Examinations.
 

Practice it now to sharpen your concepts and knowledge

 

1.What is the older high-level(non-assembler) programming language?
  • C
  • Lisp
  • Fortan 
  • Basic
C. Fortan 
2.The primary progenitor of COBOL was the programming language known as:
  • Pseudocode
  • short Code
  • speedcode
  • flow-matic.
D. flow-matic.
3.The C++ programming language is very popular because it is:
  • backward compatible with C.
  • widely available.
  • object-oriented.
  • all of the above.
C. object-oriented.
4.What innovation introduced in ALGOL68 is ofter credited to pascal?
  • user-defined data types
  • block statement
  • select statement
  • bit-string
B. block statement
5.The most common programming languages ,dating back to the 1940s are called:
  • functional
  • rule-based.
  • object-oriented
  • imperative.
D. imperative.
6.When did the first ANSI programming language stander d come out?
  • 1949
  • 1975
  • 1958 
  • 1966
C. 1958 
7.List in chronological order, when these languages become officially recognized as a standard
  • ANSI C
  • ANSI COMMON LISP
  • ANSI Cobol 
  • ANSI ADA
C. ANSI Cobol 
8.Who uses languages which are standards? (i)Processors (ii)Technicians (iii) Students (iv)Managers
  • i,ii & iii only
  • ii & iv only
  • iii & iv only
  • all of the above
D. all of the above
9. What features make C++ so powerful?
  • Easy Implementations
  • Reusing the old code
  • Easy Memory Management 
  • All of the above
C. Easy Memory Management 

 

1.What makes OOP so popular? (i) Data abstraction (ii) Easily reusable (iii) Easily modifiable (iv) None of the above
  • i only
  • i, ii & iii only
  • ii & iii only
  •  iv only
D.  iv only
2.Which of the following languages has the potential to become the next programming language standard? (i) Java (ii) Html (iii) Cobol 97 (iv) ADA 95
  • i & iv only
  • i & iii only
  • ii & iii only
  • none of the above
B. i & iii only
3.Which of the following languages is the newest?
  • Fortran
  • Lisp
  • Simula
A. C 
4.Which of the following languages is the oldest?
  • Perl 
  • PHP
  • Python
  • Ruby
A. Perl 
5.Which of the following languages introduced the notion of inheritance?
  • Simula 
  • Smalltalk
  • Algol 68
  • C++
A. Simula 
6.Which of the following are language processors?
  • Assembler
  • Compiler
  • Interpreter
  • All of the above
D. All of the above
7.A program in execution is called
  • process 
  • function
A. process 
8.An assembly language is a
  •  low level programming language
  • CPU
  • High level programming language
  • Memory
A.  low level programming language

 

1.An assembler is
  • Programming language dependent.
  • Machine dependant.
  • Syntax dependant.
  • Data dependant
  • ans2
2.Translator for low level programming language were termed as
  • Assembler
  • Compiler
  • Linker
  • Loader
  • ans1
3.What is the name of the category of programming languages whose structure is dictated by the von Neuman computer architecture?
  • Imperative
  • Functional
  • Constraint
  • Denotational
  • ans1
4.A paradigm that allows specification of what has to be computed rather than just how a computation is to be carried out.
  • Imperative
  • Functional
  • Non-procedural
  • Object-oriented
  • ans3
5.A paradigm incorporating encapsulation. Inheritance and dynamic type binding
  • Imperative
  • Functional
  •  Denotational
  • Object-oriented
  • ans4
6.Which language is considered to be the first fully object-oriented language?
  • FORTRAN
  • LISP
  • JAVA
  • COBOL
  • ans3
7.In what language is UNIX written?
  • FORTRAN
  • LISP
  • JAVA
  • C
  • ans3
8.What programming language has dominated scientific computing over the past 35 years?
  • FORTRAN
  • JAVA
  • COBOL
  • SMALL TALK
  • ans1
9.What programming language has dominated artificial intelligence programming over the past 35years?
  • FORTRAN
  • LISP
  • JAVA
  • COBOL
  • ans2
10.What programming language has dominated business applications over the past 35 years?
  • FORTRAN
  • JAVA
  • COBOL
  • SMALL TALK
  • ans3

 


1.What language has slogan ‘write once run anywhere’?
  • FORTRAN
  • LISP
  • JAVA
  • COBOL
  • C
C. JAVA
2.How is Scheme opposite to Common Lisp?
  •  Scheme is large and complex; Common Lisp is small.
  • Common Lisp is not an ANSI standard; Scheme is.
  • Scheme is exclusively statically scoped; Common Lisp supports dynamic scoping.
  • Common Lisp is interpreted; Scheme is compiled.
A.  Scheme is large and complex; Common Lisp is small.
3.Why must local variables in Lisp generally be allocated in the heap, rather than on the Stack
  • Because we don’t know their sizes at compile time.
  • Because local variables in Lisp have unlimited extent.
  • Because Lisp subroutines don’t follow strict LIFO calling conventions.
  • Because the Lisp garbage collector is unable to manipulate addresses in the stack.
B. Because local variables in Lisp have unlimited extent.
4.through Q 38 refer to the following program in Scheme: (define add-n (lambda (n) (lambda (m) (+ m n)))) (let ((n 4) (f (add-n 3))) (+ n (f 2))) What does this program print?
  • 8
  •  9 
  • 10
  • none of the above
B.  9 
5.What would the program print if Scheme used dynamic scope and shallow binding?
  • 8
  •  9 
  • 10
  • none of the above
B.  9 
6.What would be the program print if scheme used dynamic scope and deep binding?
  • 8
  •  9 
  • 10
  • none of the above
B.  9 
7.The fact that the program contains two variables named n is an example of
  • Overloading
  • Aliasing
  • Both
  • neither
D. neither
8.What would happen (in real scheme) if we reversed the order of the two definitions in the let block?
  • Nothing: the program would behave the same
  • The output would change,because f would capture a different n
  • The interpreter would complain that n is being used before it is declared
  • The interpreter would complain that the meaning of n is ambiguous
A. Nothing: the program would behave the same
9.Which of the following is not an example of a high-level programming language?
  • Machine language
  • Assembly language
  • High level language
  • Natural language
D. Natural language
10.Which of the following is not an example of a high-level programming language?
  • C++
  • PASCAL
  • Babbage 
  • BASIC
C. Babbage 

 

1.First high level language to be implemented on personal computers
  • FORTRAN 
  • BASIC
  • PASCAL
A. FORTRAN 
2.Hungarian Notation is used to
  • Design system manual
  • Design user manual
  • Define name of the variable depending on its use and data type
  • All
A. Design system manual
3.Java is a
  • Machine level language
  • Middle level language
  • High level language 
  • None
C. High level language 
4.SNOBOL is mainly used for
  • List operations
  • Numerical operations
  • Text Operation
  • None
D. None
5.Which of the following is not case sensitive language?
  • C
  • Java 
  • C++
  • None
B. Java 
6.FORTRAN is a
  • General purpose and procedural language
  • Imperative programming language
  • Both A and B
  • None
C. Both A and B
7.An assembly language consists of following which type of instructions.
  • Mnemonics
  • Opcodes
  • Operands
  • Fields
A. Mnemonics
8.‘C’ is a
  • Assembly language
  • Middle level language
  • High level language
  • None
C. High level language
9.Structured programming languages are also known as
  •  Modular 
  • Case sensitive
  • Pseudocode
  • Object oriented language
A.  Modular 
10.Which of the following is a case sensitive language?
  • C++
  • Pascal
  • BASIC
  • All
D. All

 

1.Which of the following factors should be considered while selecting a programming language for application development?
  • Nature of the application
  • Ease of learning the language
  • Familiarity with the language
  • All
D. All
2.Which of the following is best suited for system-level programming
  • BASIC
  • FORTRAN
  • none
B. C 
3.Java compiler produces
  • Byte code 
  • Object code
  • Executable code
  • None
A. Byte code 
4.Which of the following languages are difficult to modify
  • Machine level language
  • Assembly level language
  • High level language
  • None
A. Machine level language
5.Variables created in MATLAB can be seen in ___________ _
  • Command Window
  • Command History
  • Workspace
  • Current Directory
C. Workspace
6.ll variables created can be saved using command
  • Save
  • Load
  • log
  • None
A. Save
7.What is right way to create a 3×3 matrix A?
  • Matrix(A,3,3)
  • A(3,3)
  • A[123,123,123]
  • A[123; 123; 123]
D. A[123; 123; 123]
8.Transpose of matrix A can be calculated by:
  • A’ 
  • inv(A)
  • A”
A. A’ 
9.A trigonometric operation ‘sin(A)’ on matrix A will affect
  • First row elements of A
  • First column elements of A
  • All elements of A.
  • First and Last element of A
B. First column elements of A
10.“log2′ function is used for
  • Calculating logarithm of two numbers
  • Calculate log to the base 2
  • Calculate log of 2 with given no as base
  • None
C. Calculate log of 2 with given no as base

 

1.Comment on the output of following code:1. #include 2. main() 3. { 4. char *p = 0; 5. *p = ‘a’; 6. printf(“value in pointer p is %c\n”, *p); 7. }
  • It will print a
  • It will print 0
  • Compile time error
  • Run time error
C. Compile time error
2.Which of the following is a keyword used for a storage class?
  • Printf
  • externa
  • auto
  • scanf
C. auto
3.The prototype of the function in the header file isA]Stdio.h
  • stdlib.h
  • conio.h
  •  io.h
  • Stdio.h
D. Stdio.h
4.Preprocessor Directives are used for –
  • Macro Expansion
  • File Inclusion
  • Conditional Compilation
  • All of these
B. File Inclusion
5.Which function is used to read character as you type ?
  • getchar()
  • getch()
  • getche()
  • Both (B) and (C
A. getchar()
6.Which format specifier is used to print the values of double type variable
  • %If
  • %Id
  • %Iu
  • %f
A. %If
7.What will be the output of the following program? Void main( ) { Int x []= {10,20,30,40,50}; Print f (“ \n %d %d %d %d “, x [4] ,3[x] ,x[2] ,1[x] ,x[0] ); }
  • Error
  • 10 20 30 40 50
  • 50 40 30 20 10
  • None of these
A. %If
8.Which of the following is not s keyword of ‘C’ ?
  • auto
  • register
  • int
  • function
A. %If
9. What will be the output ? #define SQUARE(X) X * X void main ( ) { printf (“\n Square = %d” , SQUARE(10+2) ); }
  • Square = 144
  • Square =32
  • Square =122
  • Square =12
A. %If
10.By default a function returns a value of type
  • int
  • char
  • void
  • None of these
A. %If

 1.What will be the value of x after executing the program ?void main ( ) { int x; x = printf(“I See, Sea in C”); printf(“\n x= % d” , x); }

  • x= 15
  • x=2
  • Garbage value
  • Error
D. Error
2.Which is not keyword in ‘C’ ?
  • typedef
  • const 
  • near 
  • complex
C. near 
3.Which is valid string function ?
  • strpbrk
  • strlen 
  • strxfrm
  • strcut
B. strlen 
4.A static variable by default gets initialized to
  • 0
  • blank space
  • 1
  • garbage value
D. garbage value
5.What will be the size of following union declaration?int **x;
  • x is a pointer to pointer 
  • x is not pointer
  • x is long
  • None of these
A. x is a pointer to pointer 
6.What will be the size of following union declaration?Union Test { Int x; Char c[10 Char y; Float z; } ;
  • 10 bytes 
  • 4bytes
  • 1byte
  • 4 bytes
A. 10 bytes 
7.Which of the following are tokens in C?
  • Keywords
  • Variables
  • Constants
  • All of the above
D. All of the above
8.The size of a String variable is
  • 1 byte 
  • 8 bytes
  • 16 bytes
  • None
A. 1 byte 
9.Operators have hierarchy. It is used to know which operator
  • is most important 
  • is used first 
  • is faster
  • operates on large numbers
B. is used first 

 

1.Header files in C contain
  • Compiler commands
  • Library functions
  • Header information of C programs
  • Operators for files
B. Library functions
2.Identify the wrong statement
  • putchar(65) 
  • putchar(‘x’) 
  • putchar(“x”)
  • putchar(‘\n’)
B. putchar(‘x’) 
3.Which header file is essential for using strcmp() function?
  • string.h 
  • strings.h
  • text.h
  • strcmp.h
A. string.h 
4.Which of the following is a key word is used for a storage class
  • printf
  • external 
  • auto 
  • scanf
C. auto 
5.An Ampersand before the name of a variable denotes
  • Actual Value
  • Variable Name
  • Address 
  • Data Type
C. Address 

 1.Who invented the C – Programming?

  • James Gosling
  • Dennis Ritche
  • Bjarne Stroustrup’s
  • Tim Berners-Lee
B. Dennis Ritche
2.Where does C language get invented?
  • Ritche’s Lab
  • AT & T Bell Labs
  • Under Oak Tree
  • Fringe Labs
B. AT & T Bell Labs
3.Which symbol terminates a C statement?
  • .
  • ,
  • ;
  • }
C. ;
4.How to comment in C language?
  • //Comment
  • /* Comment */
  • <—Comment—->
  • A & B
B. /* Comment */
5.Which of the following operator takes only integer operands?
  • +
  • *
  • /
  • %
D. %
6.Pick the operator that not associates from the left?
  • +
  • =
  • <
D. <
7.In a for loop, if the condition is missing, then?
  • it is assumed to be present and taken to be false
  • it is assumed to be present and taken to be true
  • it result in the syntax error
  •  execution will be terminated abruptly
D.  execution will be terminated abruptly
8.The maximun value that an integer constant can have is ?
  • -32767
  • 32767
  • 1.7014E+38
  • -1.7014E+38
B. 32767
9.A C variable cannot start with ?
  • An alphabet
  • A number
  •  A special symbol other than underscore
  • Both (2) and (3)
D. Both (2) and (3)
10.C programs are convrted into the machine language with the help of ?
  • An editor
  • Compiler
  • An operating system
  • None of the above
B. Compiler

 

    

COMMENTS

TECH$type=three$author=hide

Name

5G Technology,1,Abbreviations,2,Agent AI,1,Agentic Ai,1,AI in Education,1,AI in Healthcare,1,AI in surgery,1,AI Reasoning,1,Algorithm,1,Algorithms,4,android,2,Artemis Mission,1,Artificial Intelligence,5,Artificial Intelligence AI,2,Artificial Neural Networks,1,ASCI and UNI),1,Augmented Reality,1,Automata,3,Blockchain,1,C Language,2,C Programming,1,c#,1,C++,2,C++ Programming,1,CakePhp,1,Carbon Neutrality,1,CCNA,1,Cellular Communication,1,Chatgpt,1,Cloud Computing,4,Compiler Construction,1,Compiler Construction Solved MCQs,1,Compiler Design,1,Computer,18,Computer Applications,1,Computer Architecture,3,Computer Arithmetics,1,Computer Basics,1,Computer Codes (BCD,1,Computer Fundamentals,5,Computer Graphics,4,Computer Networking,2,Computer Networks,4,Computer Organization,1,Computer Science,2,Computer Short Cut Keys,1,Computer Short Keys,1,CPU Sceduling,1,Cryptocurrency,1,CSS,1,CSS PMS,1,Current Trends and Technologies,1,Custom Hardware,1,Cyber Security,6,Cybercrimes,1,DALL-E,1,Data Communication,1,Data Privacy,1,Data structures,3,Database Management System,4,DBMS,4,Deadlock,1,DeepSeek,1,Digital Systems,1,Digital Systems Solved MCQs - Part 2,1,Discrete Mathematics,2,Discrete Structure,1,dot Net,1,EBCDIC,1,Edge Computing,1,English,1,Ethical AI and Bias,1,Ethics,1,Explainable AI (XAI),1,File System,1,Flowcharts,1,General Data Protection Regulation GDPR,1,General Knowledge,1,Generative AI,1,Gig Economy,1,Graphics Designing,1,Helping Materials,1,HTML,1,HTML 5,1,hybrid work model,1,Inference Optimization,1,Information Systems,1,Information Technology,1,Inpage,1,intelligence,1,Internet,1,Internet Basics,1,Internet of Things,1,Internet of things IOT,2,IT,1,JavaScript,1,jQuery,1,Language,11,Languages Processor,1,Languge,1,Li-Fi,1,Linux/Unix,2,Magento,1,Memory Management,1,Microprocessor,1,Microsoft PowerPoint,1,MidJourney,1,mindfulness apps,1,MS Access,1,MS DOS,1,MS Excel,1,MS Word,2,Multimodal AI,1,Number System,1,Object Oriented Programming (OOP),1,Object Oriented Programming(OOP),1,Operating System,9,Operating System Basics,1,oracle,2,Others,1,Pakistan,1,PCS,1,PHP,1,PMS,1,Process Management,2,Programming,3,Programming Languages,1,Python,2,python language,1,Quantitative Aptitude,2,Quantum Computing,2,R Programming,1,Ransomware,1,Robotic Process Automation RPA,1,Robotics,2,Ruby Language,1,search engine optimization,1,Semester III,2,seo,1,Sloved MCQs on Microsoft Power Point - updated,1,Software Engineering,3,Solved MCQs of MS Access - Updated,1,Solved MCQs on Computer Fundamentals,1,SpaceX Starship,1,SQL,1,System Analysis and Design,1,Theory of Computation,1,Trends and Technologies,1,Virtual Reality,1,web,1,web Fundamental,1,Web Technologies,2,Web3,1,x8086,1,zoology,1,
ltr
item
COMPUTER SCIENCE SOLVED MCQS: Programming In C Solved MCQs
Programming In C Solved MCQs
https://blogger.googleusercontent.com/img/a/AVvXsEjFCJprLHm7Fa8aCRY9_usfX7-SIifbpidBjLvHp_se1cvr1kpl-eHz9MQPq2qVJIxXBCizHJqrBuw9vM-df7R7NWfSaQ3cGiYV9khcL_AEEys4uxq0JHxzTNRyfgf30VxVAWsfi_lz1-sxNe79J3RFHKjhywQJnrDzMR0nBtG41nM94PcktbHpUXzB
https://blogger.googleusercontent.com/img/a/AVvXsEjFCJprLHm7Fa8aCRY9_usfX7-SIifbpidBjLvHp_se1cvr1kpl-eHz9MQPq2qVJIxXBCizHJqrBuw9vM-df7R7NWfSaQ3cGiYV9khcL_AEEys4uxq0JHxzTNRyfgf30VxVAWsfi_lz1-sxNe79J3RFHKjhywQJnrDzMR0nBtG41nM94PcktbHpUXzB=s72-c
COMPUTER SCIENCE SOLVED MCQS
https://cs-mcqs.blogspot.com/2023/06/programming-in-c-solved-mcqs.html
https://cs-mcqs.blogspot.com/
https://cs-mcqs.blogspot.com/
https://cs-mcqs.blogspot.com/2023/06/programming-in-c-solved-mcqs.html
true
1616963833964386058
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content