August 30, 2016 0 Welcome to your Yippee Technology Online Aptitude Test on C, HTML and CSS Name Which of the following is a way to associate styles with your HTML document? Inline CSS - The style Attribute Embedded CSS - The Element None of the above. Both of the above. What is use of \r in c? places cursor at the end of line used to insert a vertical tab used to insert a tab places cursor at the start of line Apart from tag, what other tag makes text bold ? Size of void pointer is 1 byte 8 byte 2 byte 4 byte Which of the following property serves as shorthand for the padding properties? padding-right padding-left padding-top padding void main() { char s[ ]="man"; int i; for(i=0;s[ i ];i++) printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]); } mmmm aaaa nnnn aaaa mmmm nnnn mmm aa nnn mmmm aa nn what is mean by alt value in tag ? Alternative source of image Caption of image Alternative text of image All of above #include main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s; printf("%d",s->x); printf("%s",s->name); } 3hello Compiler error 3 hello n What is the output of the following: #include int fun(int count) { printf("%d\n", count); if(count < 3) { fun(fun(fun(++count))); } return count; } int main() { fun(1); return 0; } A. 1 2 3 3 3 3 3 B. 1 2 3 C. 1 2 2 2 2 2 2 D. 1 2 A C D B Which of the following property allows you to control the shape or appearance of the marker of a list? list-style list-style-type list-style-image list-style-position How can you open a link in a new tab/browser window? Which of the following property is used to increase or decrease how bold or light a font appears? font-size font-variant font-style font-weight What is the correct HTML for referring to an external style sheet? None of these How can you make a bulleted list with numbers? Which of the following is illegal? string s, *sp = 0; int *pi = 0; int i; double* dp = &i; int *ip; Consider c code int main(){ printf("%d",sizeof(3.8)); return 0; } Which of the following is true? Compiler Error None of these 4 10 8 Which of the following is an attribute of tag ? Bold src link cellpadding What is the output of this C code? void foo(float *); int main(){ int i = 10, *p = &i; foo(&i); } void foo(float *p) { printf("%f\n", *p); } Undefined behaviour 10.000000 0.000000 Compile time error #include #include int main(){ void (*p)(); int (*q)(); int (*r)(); p = clrscr; q = getch; r = puts; (*p)(); (*r)("cquestionbank.blogspot.com"); (*q)(); return 0; } (A) NULL (B) cquestionbank.blogspot.com (C) c (D) Compilation error (E) None of above C A D B #include using namespace std; class B { public: void display() { cout<<"Content of base class.\n"; } }; class D : public B { public: void display() { cout<<"Content of derived class.\n"; } }; int main() { B *b; D d; b->display(); b = &d; /* Address of object d in pointer variable */ b->display(); return 0; } A.Content of base class. Content of base class. B.Content of base class. Conitent of derived class. C.Content of derived class. Content of base class. D.Conitent of derived class. Conitent of derived class. B A C D Tags and test that are not directly displayed on the page are written in _____ section. Can you combine the following two statements into one? char *p; p = (char*) malloc(100); A. char p = *malloc(100); B. char *p = (char) malloc(100); C. char *p = (char*)malloc(100); D. char *p = (char *)(malloc*)(100); B A C D Which of the following selector selects all paragraph elements with a lang attribute? p[lang~="fr"] p[lang|="fr"] Show Answer p[lang="fr"] p[lang] #include int main(){ int i,j; i=j=2,3; while(--i&&j++) printf("%d %d",i,j); return 0; } A.1 3 B.2 3 C.1 2 D.1 2 3 A C D B which HTML tag is used to display the power of any expression ? Which of the following selector matches all elements of a type? The Universal Selector The Class Selector The Descendant Selector The Type Selector choose the correct HTML tag to left align the content of cell horizontally ? None of these what is empty elements in HTML an element with no comment an element with no attribute an element with empty content an element with no tag Which of the following is correct about CSS? All of the above. CSS is used to control the style of a web document in a simple and easy way. CSS is the acronym for "Cascading Style Sheet". You can write CSS once and then reuse same sheet in multiple HTML pages. how to set picture as a background web page ? the element is container for pictures webpages metadata links What is return type of malloc() function? int void int* void* Which of the following property of a anchor element signifies an element that currently has the user's mouse pointer hovering over it? link visited active hover ..... tag is used for ______? None of these Table Row Table Heading Table Record How do you insert a comment in a CSS file? /* this is a comment */ // this is a comment // this is a comment // Both A and B How do you display hyperlinks without an underline? a {underline:none} a {text-decoration:no underline} a {text-decoration:none} a {decoration:no underline} in HTML iframe is used to to display picture within a picture to display link within a link to display a table within a table to display web page within a web page HTML web pages can be read and rendered by _________. Compiler Web Browser Interpreter Server HTML uses User defined tags Tags only for linking Fixed tags defined by the language Pre-specified tags void print(int n) { if (n == 0) return; printf("%d", n%2); print(n/2); } What will be the output of print(12). 1001 0011 1100 1000 C Which type of files can’t be opened using fopen()? None of the mentioned .txt .c .bin #include int main() { int a=10; void f(); a = f(); printf("%d\n", a); return 0; } void f() { printf("Hi"); } A. Error: Not allowed assignment B. Error: Doesn't print anything C. No error D. None of above A B C D If you want the table borders to collapse into one border, which property you will use ? border-collapse: none; border-collapse: -1; border-collapse: 0; border-collapse: collapse; Fundamental HTML Block is known as ___________. HTML Element HTML Attribute HTML Body HTML Tag which organization defines the web standards ? Microsoft corporation w3 IBM corporation World Wide Web Consortium #define int char main() { int i=65; printf("sizeof(i)=%d",sizeof(i)); } Depends on compiler sizeof(i)=65 sizeof(i)=2 sizeof(i)=1 HTML is what type of language ? Scripting Language Programming Language Network Protocol Markup Language Which of the following property is used to change the face of a font? font-family font-variant font-style font-weight How do you add a background color for all HTML elements? h1 {background-color:#FFFFFF; h1.all {background-color:#FFFFFF; all.h1 {background-color:#FFFFFF;} Which of the following is correct about Hex Code format of CSS colors? The next two are a green value(GG). The first two digits(RR) represent a red value. All of above The last are the blue value(BB). What tag is used to display a picture in a HTML page? image img src picture Which of the following property is used to capitalize text or convert text to uppercase or lowercase letters? text-align text-indent text-transform text-decoration Time's up