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