Why strncpy() is not respecting the given size_t n which is 10 in temp2?

This problem is blowing my mind…Can anyone please sort out the problem because i have already wasted hours on this.. ;( #include <stdio.h> #include <string.h> int main(){ char string[] = “Iam pretty much big string.”; char temp1[50]; char temp2[10]; // strcpy() and strncpy() strcpy(temp1, string); printf(“%s\n”, temp1); strncpy(temp2, temp1, 10); printf(“%s\n”, temp2); return 0; }…

Details

How to create oracle connection in Spring application deployed in JBoss Server? (WrappedConnectionJDK8 cannot be cast to oracle.jdbc.OracleConnection)

I want to create oracle connection. Currently i am passing jdbc connection to create struct descriptor and here i am getting exception as below. so to avoid this, required to create a java.sql.connection or oracle connection instead of getting from data source. org.jboss.resource.adapter.jdbc.jdk8.WrappedConnectionJDK8 cannot be cast to oracle.jdbc.OracleConnection I found for JDK6 a solution, but…

Details