C Programming

Description: Get complete study material to prepare for any Entrance, Test Papers to check the basic programming skills using C covers all concepts like arrays, loops, conditions, file Handling in C, polymorphism, functions, data structure
Number of Questions: 25
Created by:
Tags: C Programming in C Pointers in C Exploring C Functions Arrays Loops Conditions File Handling in C Letter E Antonyms Synonyms Programming Fundamentals of Computer Programming
Attempted 0/25 Correct 0 Score 0

If a static array is not initialised, its elements will be set at

  1. 0

  2. an undetermined value

  3. floating point number

  4. the character constant '-'


Correct Option: A

The maximum value that an integer constant can have is

  1. 32767

  2. � 32767

  3. 1.7014e+38

  4. �1.7014e+38


Correct Option: A

Give the output of the following program: main( ) { int a=30,b=40,x; x=((a!=10) && (b=50)) printf(“x=%d”,x)' }

  1. x = 1

  2. x = 0

  3. no output

  4. none of these


Correct Option: A

The format specifier used for long unsigned is

  1. %u

  2. %ud

  3. %lu

  4. %l


Correct Option: C

If a character string is to be received through keyboard, which function would work faster?

  1. getch( );

  2. gets( );

  3. getchar( );

  4. getche( );


Correct Option: B

The output of: 13% - 3 will be

  1. � 1

    • 1
    • 4
  2. � 4


Correct Option: A

The format string of printf() function can contain

  1. character, conversion specifications and escape sequences

  2. character, integers and floats

  3. strings, integers and escape sequences

  4. none of these


Correct Option: A

int num[ ] = {24,32,12,44,56,17}, *(num +4) refers to

  1. 56

  2. 44

  3. 17

  4. none of these


Correct Option: A

int num[ ] = {24,32,12,44,56,17}, *(num +0) refers to

  1. 12

  2. 32

  3. 24

  4. none of these


Correct Option: C

The declaration 'char *ch' means

  1. ch contains the address of char variable

  2. ch is a char variable

  3. ch is going to contain a char value

  4. none of these


Correct Option: B

To receive the string “we are going” in an array char str[100], which of the following functions would you use?

  1. scanf(“%s”,str);

  2. gets(str);

  3. getche(str);

  4. fgetchar(str);


Correct Option: B

The value of 15/10.0 is

  1. 0.5

  2. 1.5

  3. 0

  4. none of the above


Correct Option: B

int i; int *j; int **k; In the above declaration, 'k' is a

  1. pointer to a variable

  2. pointer variable

  3. pointer to an int pointer

  4. none of these


Correct Option: A

num[i] is same as

  1. *(num+i)

  2. *num+I

  3. *i+num

  4. none of these


Correct Option: A

The Range of Short signed integer is

  1. � 128 to + 127

  2. 0 to 255

  3. 0 to 65535

  4. � 32768 to + 32767


Correct Option: D

The minimum number of temporary variables needed to swap the contents of two variables, is

  1. 1

  2. 2

  3. 3

  4. 0


Correct Option: A

The output of expression 9-12/(3 + 3)*(2 - 1), is

  1. 7

  2. 5

  3. 0

  4. none of the above


Correct Option: A

Which of the following is the correct way of declaring a float pointer?

  1. float ptr

  2. float *ptr

  3. *float ptr

  4. none of these


Correct Option: B

If int s[5] is a one dimensional array of integers, which of the following refers to the 3rd element in the array?

  1. *(s+2)

  2. *(s+3)

  3. s+3

  4. s+2


Correct Option: A

*operator used in pointer notation stands for

  1. address of operator

  2. value at address

  3. address of a variable

  4. none of these


Correct Option: B

A pointer enables us to access a variable that is defined

  1. inside the function

  2. outside the function

  3. within the function

  4. none of these


Correct Option: B

Which function would you use if a single key is to be received through the keyboard?

  1. puts( );

  2. gets( );

  3. getchar( );

  4. none of these


Correct Option: C

In the declaration float, *s mean that

  1. 's' is a float variable

  2. 's' is going to contain a floating point value

  3. 's' contains the address of a floating point variable

  4. none of these


Correct Option: C

main() { int i=3; printf(Value of i=%d,*(&i)); }
Give the output of above program.

  1. Value of i=6485

  2. Value of i=3000

  3. Value of i=3

  4. None of these


Correct Option: C

If an integer is to be entered through keyboard, which function you would use?

  1. scanf( )

  2. gets( );

  3. getchar( );

  4. getche( );


Correct Option: A
- Hide questions