You are on page 1of 3

GLOBAL EDGE PAPER 2

/* C question and answers


All questions are tested in Turbo C compiler and have not been
tested in gcc or (linux platform) */
---------------------------------------------------1)
#include<stdio.h>
main()
{
scanf("%d");
printf();
}
which of the following is correct?
a)compilation error
b)Run time error
c)No output
d)depends on the compiler
ans : a
--------------------------------------------------------2)
#include<stdio.h>
#define islower(c) ('a'<=(c) && (c)<='z')
#define toupper(c) (islower(c)?(c)-('a'-'A'):(c))
main()
{
char *p="i am fine";
while(*p)
printf("%c",toupper(*p++));
}
a)bcd
b)AFE
c)aFe
d)BCd
ans : b ( macro substitution 3 times)
---------------------------------------------------------3)
#include<stdio.h>
main()
{
200;
printf("tricky problem");
}

a)warning message
b)compilation error
c)run time error
d)none of these
ans : a
-----------------------------------------------------------4)which is the null statement?
a)
;
b) {}
c) '\0';
d)all of these
ans : a
-----------------------------------------------------------5)what is the correct prototype of printf function ?
a)printf(char *p,...);
b)printf(const *char *p,...);
c)printf(const char *p,...);
d)printf(const *char p,...);
ans : c
----------------------------------------------------------/* questions on computer concepts */
1)which of the following is not a system file?
a).sys
b).com
c).ini
d)none
ans : d
--------------------------------------------------------------2)A magnetic tape is equivalent to which of the following structure?
a)Graphs
b)trees
c)Lists
d)Dictionaries
ans : c
-----------------------------------------------------------3)For a linked list implementation which searching technique is not
applicable?
a)linear search
b)none

c)quick sort
d)binary search
ans : d
---------------------------------------------------------------4)Encryption and decryption is done in which layer?
a)DLL
b)Network layer
c)transport layer
d)presentation layer
ans : d
-----------------------------------------------------------5)which of the following is not performed by the OS?
a)cpu shceduling
b)memory management
c)Transaction
d)none
ans : c
-----------------------------------------------------------

You might also like