What will be the output of the following program in 16 bit platform assuming that 1022 is memory address of the string "Hello1" (in Turbo C under DOS) ?
#include<stdio.h>
int main() { printf("%u %s\n", &"Hello1", &"Hello2"); return 0; }
1022 Hello2
Hello1 1022
Hello1 Hello2
1022 1022
Which header declares several functions useful for testing and mapping characters?
assert.h
stdio.h
ctype.h
errno.h
The______function tests for any character for which isalpha or isdigit is true
isxdigit()
isspace()
isalnum()
isupper()
What does the following C code do? int iscntrl( int c);
checks if character is upper case
checks if character is lower case
tests for any control character
no function as such
What do the following C function do? int isgraph(int c);
tests for only space character
tests for only digit
tests for only lower case
tests for any printing character
The isdigit function tests for any decimal-digit character
true
false
Which function returns true only for the characters defined as lowercase letters?
islow()
islower()
isalpa()
isalnum()
This function checks whether the passed character is white-space.
ispunct()
isgraph()
isspace()
isalpha()
The standard white-space characters are the following: space (' '), form feed (' \ f '), newline (' \n') , horizontal tab (' \tr), and vertlcal tab (' \v') can be tested with function.
ispunct()
isalpha()
isgraph()
isspace()
Which function tests for any character that is an uppercase letter.
iscntrl()
ispunct()
isdigit()
isupper()
The______function tests for any hexadecimal-digit character.
iscntrl()
ispunct()
isgraph()
isxdigit()
The________function converts an uppercase letter to the corresponding lowercase letter.
islower()
isupper()
toupper()
tolower()
The toupper() function converts a ______ to the corresponding ______
uppercase, lowercase
lowercase, uppercase
binary, decimal
decimal, binary
fgetc, getc, getchar are all declared in ________
stdio. h
ctype. h
assert. h
stdarg. h
isalpha() function is used to detect characters both in uppercase and lowercase.
true
false
What will be the output of the following C code? int ch= ' '; if(isgraph(ch)) printf("ch = %c can be printed \n",ch); else printf("ch=%c cannot be printed \n",ch);
ch = ‘ ‘ can be printed
ch = ‘ ‘ cannot be printed
compile error
run-time error
The C library function checks whether the passed character is printable
isgraph()
isalpha()
isprint()
ispunct()
What will be the output of the following C code?
char ch[ ] = "0xC"; if(isxdigit(ch[ ])) printf("ch = %s is hexadecimal character \n",ch); else printf("ch = %s is not hexadecimal character \n",ch);
ch = 0xC is hexadecimal character
ch = 0xC is not hexadecimal character
compile error
run-time error
Which among the following option is the full set of character class Hexadecimal digits?
{ 0 1 2 3 4 5 6 7 8 9 A B C D E F }
{ 0 1 2 3 4 5 6 7 8 9 a b c d e f }
{ 0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f }
{ 0 1 2 3 4 5 6 7 8 9}
What will be the output of the following C code?
int i = 0; char c; char str[ ] = "Little Star"; while(str[i]) { putchar (toupper(str[i])); i++; }
little star
lITTLE sTAR
LITTLE STAR
Little Star
What will be the output of the following C code?
int ch = '\t'; if(isprint(ch)) printf("ch = |%c| printable \n", ch); else printf("ch= |%c| not printable \n",ch);
ch = |\t| printable
ch = |\t| not printable
ch = | | printable
ch = | | not printable
_______ occurs when a result is too large in magnitude to represent errors as a floating-point value of the required type.
underflow
significance loss
domain
overflow
What occurs when a result has nowhere near the number of significant digits indicated by its type.
domain
underflow
overflow
siginificance loss
What error occurs when a result is undefined for a given argument value?
significance loss
underflow
overflow
domain
_____ is reported on a domain error.
EDOM
ERANGE
Significance loss
Underflow
ERANGE is reported on an overflow or an underflow.