0% found this document useful (0 votes)
150 views6 pages

PDF

This document contains 15 multiple choice questions about C programming concepts such as data types, operators, functions, pointers, arrays, and object-oriented programming. The questions cover a wide range of fundamental and advanced C topics including: - Identifying C as a high-level language and C++ as an object-oriented language. - Understanding pointer usage and passing, returning pointers from functions. - Recognizing recursive functions and how they call themselves. - Evaluating expressions and operator precedence. - Analyzing code snippets containing arrays, pointers, functions.

Uploaded by

1min review
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
150 views6 pages

PDF

This document contains 15 multiple choice questions about C programming concepts such as data types, operators, functions, pointers, arrays, and object-oriented programming. The questions cover a wide range of fundamental and advanced C topics including: - Identifying C as a high-level language and C++ as an object-oriented language. - Understanding pointer usage and passing, returning pointers from functions. - Recognizing recursive functions and how they call themselves. - Evaluating expressions and operator precedence. - Analyzing code snippets containing arrays, pointers, functions.

Uploaded by

1min review
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

1.

'C' is often called a ________

Object oriented language


High level language
Assembly language
Machine level language
None of these
2.
Which of the following is object oriented programming ?

C
C++
BASIC
FORTRAN
None of these
3.
The value that follows the keyword CASE may only be

constants
variable
semicolon
number
None of these
4.
Advantages of using flow charts is

Effective Analysis
Efficient Coding
Time consuming
Effective Analysis and Efficient Coding
Time Analysis
5.
A pointer variable can be

passed to a function as argument.


changed within function.
returned by a function.
assigned an integer value.
None of these
6.
Which of the following is true about recursive function ?

i. it is also called circular definition


ii. it occurs when a function calls another function more than once
iii. it occurs when a statement within the function calls the function itself
iv. a recursive function cannot have a return statement within it
i and iii
i and ii
ii and iv
i, iii and iv
None of these
7.
The output of this code is :
{
int a = 5;
int b = 10;
cout << (a>b?a:b);
}

5
10
20
Syntax error
None of the above
8.
What is the output of the following code ?

void main()
{
int i = 100, j = 200;
const int *p=&i;
p = &j;
printf("%d",*p);
}

100
200
300
400
None of the above
9.
The output of this code is :

main()
{
long i = 30000;
printf("%d", i);
}

3000
30000
0
-1
1
10.
What is the output of the following program code ?

#include<`stdio.h`> (Please neglect `` this signs)


void abc(int a[])
{
a++;
a[1]=612;
}
main()
{
char a[5];
abc(a);
printf("%d",a[4]);
}

100
612
800
Error
None of these
11.
What is the output of the following code ?

#include<`stdio.h`> (Please neglect `` this signs)


void main()
{
int arr[] = {10,20,30,40,50};
int *ptr = arr;
printf(" %d %d ",*ptr++,*ptr);
}

10 20
10 10
20 20
20 10
Error
12.
What would be the output of the following program ?
#include <`stdio.h`> (Please neglect `` this signs)
main()
{
printf(" %c", "abcdefgh"[4]);
}

abcdefgh
d
e
error
None of these
13.
What is the output of the following program ?

#include <`stdio.h`> (Please neglect `` this signs)


void main()
{
printf(" 10!=9 : %5d",10!=9);
}

1
0
-1
Error
None of these
14.
What is the output of the following code ?

#include<`stdio.h`> (Please neglect `` this signs)


void main()
{
int a=14;
a += 7;
a -= 5;
a *= 7;
printf(" %d",a);
}

112
98
86
74
None of these
15.
#include<`stdio.h`> (Please neglect `` this signs)
main()
{
int *p1,i=25;
void *p2;
p1=&i;
p2=&i;
p1=p2;
p2=p1;
printf("%d",i);
}

The output of the above code is :

25
Garbage value
Address of I
625
Program will not compile

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy