Why c is a procedural language?
Write a Program to print this triangle: * ** * **** * ****** * ******** * ********** use two nested loops.
12 Answers MIT, TCS,
Tell me when is a void pointer used?
#include<stdio.h> #include<conio.h> void main() { char ch='\356'; printf("%d",ch); } o/p=-18 why?plz.explain
write a programe returns the number of times the character appears in the string
If we have an array of Interger values, find out a sub array which has a maximum value of the array and start and end positions of the array..The sub array must be contiguious. Take the start add to be 4000. For Ex if we have an array arr[] = {-1,-2,-5,9,4,3,-6,8,7,6,5,-3} here the sub array of max would be {8,7,6,5} coz the sum of max contiguous array is 8+7+6+5 = 26.The start and end position is 4014(8) and 4020(5).
5 Answers Microsoft, Motorola,
f(char *p) { p=(char *)malloc(sizeof(6)); strcpy(p,"HELLO"); } main() { char *p="BYE"; f(p) printf("%s",p); } what is the output?
9 Answers Hughes, Tech Mahindra,
what will be the result of the following program ? char *gxxx() { static char xxx[1024]; return xxx; } main() { char *g="string"; strcpy(gxxx(),g); g = gxxx(); strcpy(g,"oldstring"); printf("The string is : %s",gxxx()); } a) The string is : string b) The string is :Oldstring c) Run time error/Core dump d) Syntax error during compilation e) None of these
How do you view the path?
Why structure is used in c?
How to find the given no is odd or even without checking of any condition and loops. (Hint: Using array)
related to rdbms query .
What is printf () in c?