what is meant by the "equivalence of pointers and arrays" in
C?
Answers were Sorted based on User's Feedback
Answer / sameer
name of array(without subscript) points to the first
location of array.
eg. a[10].
a points to first location of array.
| Is This Answer Correct ? | 1 Yes | 3 No |
Write a program that accepts a string where multiple spaces are given in between the words. Print the string ignoring the multiple spaces. Example: Input: “ We.....Are....Student “ Note: one .=1 Space Output: "We Are Student"
What will be result of the following program? void myalloc(char *x, int n) { x= (char *)malloc(n*sizeof(char)); memset(x,\0,n*sizeof(char)); } main() { char *g="String"; myalloc(g,20); strcpy(g,"Oldstring"); printf("The string is %s",g); } a) The string is : String b) Run time error/Core dump c) The string is : Oldstring d) Syntax error during compilation e) None of these
hi , please send me NIC written test papers to sbabavalli@gmail.com
how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?
Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)
Snake Game: This is normal snake game which you can find in most of the mobiles. You can develop it in Java, C/C++, C# or what ever language you know.
7 Answers Accenture, Gridco, IBM, Kevin IT, TCS, Vimukti Technologies,
You have given 2 array. You need to find whether they will create the same BST or not. For example: Array1:10 5 20 15 30 Array2:10 20 15 30 5 Result: True Array1:10 5 20 15 30 Array2:10 15 20 30 5 Result: False One Approach is Pretty Clear by creating BST O(nlogn) then checking two tree for identical O(N) overall O(nlogn) ..we need there exist O(N) Time & O(1) Space also without extra space .Algorithm ?? DevoCoder guest Posted 3 months ago # #define true 1 #define false 0 int check(int a1[],int a2[],int n1,int n2) { int i; //n1 size of array a1[] and n2 size of a2[] if(n1!=n2) return false; //n1 and n2 must be same for(i=0;i<n1-1;i++) { if( !( (a1[i]>a1[i+1]) && (a2[i]>a2[i+1]) ) ) return false; } return true;//assumed that each array doesn't contain duplicate elements in themshelves }
what is the diff b/w static and non static variables in C. Give some examples plz.
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
How to explain the final year project as a fresher please answer with sample project
write a function to find whether a string is palindrome or not and how many palindrome this string contain?
What is difference between structure and union in c?